Skip to content

Commit

Permalink
Initial import of ssmtp version 2.63
Browse files Browse the repository at this point in the history
  • Loading branch information
Anibal Monsalve Salazar committed Apr 16, 2008
0 parents commit 5e89737
Show file tree
Hide file tree
Showing 62 changed files with 10,125 additions and 0 deletions.
101 changes: 101 additions & 0 deletions CHANGELOG_OLD
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
### This is now deprecated. Please see the RCS log for ssmtp.c etc for ###
### upto date change information ###

Thu Feb 24 09:19:51 EST 2000 Hugo Haas
- Fixed stripFromLine() which was generating wrong From: line (Debian bug
#58863).

Sun Feb 20 22:35:36 EST 2000 Hugo Haas
- stripFromLine() now supports addresses like "hugo@debian.org (Hugo Haas)"

Sat Feb 5 15:07:47 EST 2000 Hugo Haas
- Applied patch from Tony Finch <fanf@demon.net> for Sendmail's -f
option.
- Added a WARNING file.

Sun Jan 16 13:47:46 EST 2000 Hugo Haas
- Applied patch by Michael Luxton <lux99999@yahoo.com> adding per-user
mailhub specification to reverse alias feature

Sun Dec 5 14:19:57 EST 1999 Hugo Haas
- Applied patch by Andreas Trottmann <andreas.trottmann@werft22.com>
preventing buffer overflows.

August 1999 Grant Edwards
- Added support for plaintext (base64) login authorization
options -au Username -ap Password will cause ssmtp to attempt
to login to the ESMTP server. Only tested w/ MS-Exchange server.

June 1999 Hugo Haas
- Added parseaddr correctly parsing RFC822 addresses, written by Miquel
van Smoorenburg <miquels@cistron.nl> (Debian Bug #38795).

March 1999 Hugo Haas
- Added patch by Joel Rosdahl <joel@debian.org> adding FromLineOverride

January 1999 Hugo Haas
- Corrected (again) options parsing mechanism: -R option is now ignored
correctly

October 1998 Hugo Haas
- Corrected option parsing mechanism
- Added support for the '-f', '-F' and '-r' options

June 1998 Hugo Haas
- Using macros for the configuration and reverse aliases files

June 1998 Hugo Haas
- Cleanup of the source
- Options can now be specified using a single block (Debian Bug#22691)
- Wrote stripFromLine() options

April 1998 Hugo Haas
- Made 'Root' option work (Debian Bug#21335)
- Handled the case when the user has no name (do not send "(null)")

April 1998 Hugo Haas
- Now ignoring -R keyword, -N dsn stuff

April 1998 Hugo Haas
- Removed awful getDate() method; replaced by get_arpadate()

April 1998 Hugo Haas
- Removed quote in the From: line

March 1998 Hugo Haas
- Moved the configuration files to /etc/ssmtp

March 1998 Hugo Haas
- No more adding "To: postmaster" (qmail and sendmail do this)
- Improved "-f", "-F" and "-r" options

January 1998 Hugo Haas
- Changed the configuration parsing (Debian Bug#17470)
- Changed the logging: verbosity reduced

January 1998 Hugo Haas
- Changed the header parsing because it gobbled pseudo-header lines
(Debian Bug#17240)
- Changed the RewriteDomain option

December 1997 Hugo Haas
- Changed the MAIL FROM command to be RFC821 compliant (Debian Bug#15690)
- Modified the recordReciepient function: no memory was allocated for
the last recipient
- Added the sending of the recorded recipients (Debian Bug#15690)
The old way to do it was wrong. (Removed the argv=reciepients stuff)

November 1997 Hugo Haas
- Changed the RCPT stuff which was wrong for arguments with "<>"

October 1997 Hugo Haas
- Added the reverse aliases process for the From: field
- Send the required headers at the beginning
- Send only one recipient at a time
- Changed the header parsing to avoid a bug due to mailx

September 1997 Christoph Lameter
- Fixed up to use more modern C (attempt to fix problems)
- Fixed scores of bugs (I doubt it ever worked before)
- Made it work under Debian/Linux
- Add support for -t option. Limit header to 4K.
340 changes: 340 additions & 0 deletions COPYING

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions COPYRIGHT
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sSMTP is licensed under the GNU General Public License (GPL)
version 2 or above.

Copyright (C) 2004-2008 Anibal Monsalve Salazar <anibal@debian.org>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

Please read the "COPYING" file in the archive root, or visit
http://www.gnu.org/licenses/gpl.html, for information about the GPL.
76 changes: 76 additions & 0 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
To install ssmtp:
-----------------

Check the options and directories in Makfile.

Then type:

make

and finally install the files:

make install

or to install it as the main Mail Transport Agent

make install-sendmail

-- Hugo


Fedora Core 1 system install:
-----------------------------

I would actually just suggest the INSTALL from automake. But:

If you are building sSMPT from scratch the following steps worked on a
Fedora Core 1 system. To install it in the /usr/local directory:

./configure
make
make install

Then edit the ssmpt.conf file /usr/local/etc and create a symbolic
link from where your system thinks the sendmail binary goes to the
/usr/local/sbin/ssmpt executable.

-- Sven Heinicke <sven@nec-labs.com>


Information about the options:
------------------------------

To install this program, you compile it with the correct options
and copy the binary.

If you have more than one community which uses a given binary,
there is a small (3 line) config file that allows setting variables
that aren't static.
These three are
root: The person who gets root's mail (also daemons', etc).
This userid (on the mailhub) get all mail sent to
local adressees with userids less than 10. In other
words, she gets mail the system mails to root, daemon,
etc.
mailhub: The place where the mail goes. This is looked up with
gethostbyname, and so must resolve to an IP address. MX
records don't count, as several vendors' machines that we
run ssmtp on (notably suns) don't fully support them.
They'd be nice, though...
rewriteDomain: The place to say the mail came from. This is for
hostname-hiding, and only applies if the programs is
compiled with REWRITE_DOMAIN defined. We don't usually have
to do so (our main mailhubs run zmailer: our clients run all
sorts of junk).
hostname: the Fully Qualified Domain Name of the machine, in case
you have set hostname to the short form.

The full set of options are discussed in the makefile, and briefly are the
type of machine to compile for, the place to send the mail and the domain to
rewrite to, if applicable.

To make multiple versions I use symlink-trees and scripts that passes
options to the make command, then renames the binaries to things like
ssmtp.S4C-SunOS4.1.1... I also can make DEC-style setld kits.

-- dave
94 changes: 94 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@


srcdir= @srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
libexecdir=@libexecdir@
bindir=$(prefix)/sbin
mandir=$(prefix)/man/man8

LN_S=@LN_S@
CC=@CC@

etcdir=@sysconfdir@
SSMTPCONFDIR=$(etcdir)/ssmtp
# (End of relocation section)

# Configuration files
CONFIGURATION_FILE=$(SSMTPCONFDIR)/ssmtp.conf
REVALIASES_FILE=$(SSMTPCONFDIR)/revaliases

INSTALLED_CONFIGURATION_FILE=$(CONFIGURATION_FILE)
INSTALLED_REVALIASES_FILE=$(REVALIASES_FILE)

# Programs
GEN_CONFIG=$(srcdir)/generate_config

SRCS=ssmtp.c arpadate.c base64.c xgethostname.c @SRCS@

OBJS=$(SRCS:.c=.o)

INSTALL=@INSTALL@

EXTRADEFS=\
-DSSMTPCONFDIR=\"$(SSMTPCONFDIR)\" \
-DCONFIGURATION_FILE=\"$(CONFIGURATION_FILE)\" \
-DREVALIASES_FILE=\"$(REVALIASES_FILE)\" \


CFLAGS=@DEFS@ $(EXTRADEFS) @CFLAGS@

.PHONY: all
all: ssmtp

%.dvi: %.tex
latex $<

.PHONY: install
install: ssmtp $(GEN_CONFIG)
$(INSTALL) -d -m 755 $(bindir)
$(INSTALL) -s -m 755 ssmtp $(bindir)/ssmtp
$(INSTALL) -d -m 755 $(mandir)
$(INSTALL) -m 644 $(srcdir)/ssmtp.8 $(mandir)/ssmtp.8
$(INSTALL) -d -m 755 $(SSMTPCONFDIR)
$(INSTALL) -m 644 $(srcdir)/revaliases $(INSTALLED_REVALIASES_FILE)
$(GEN_CONFIG) $(INSTALLED_CONFIGURATION_FILE)


.PHONY: install-sendmail
install-sendmail: install
$(RM) $(bindir)/sendmail
$(LN_S) ssmtp $(bindir)/sendmail
$(INSTALL) -d -m 755 $(libexecdir)
$(RM) $(libexecdir)/sendmail
$(LN_S) sendmail /lib/sendmail
$(RM) $(mandir)/sendmail.8
$(LN_S) ssmtp.8 $(mandir)/sendmail.8

.PHONY: uninstall
uninstall:
$(RM) $(bindir)/ssmtp
$(RM) $(mandir)/ssmtp.8
$(RM) $(CONFIGURATION_FILE) $(REVALIASES_FILE)
$(RM) -r $(SSMTPCONFDIR)

.PHONY: uninstall-sendmail
uninstall-sendmail: uninstall
$(RM) $(bindir)/sendmail /lib/sendmail
$(RM) $(mandir)/sendmail.8

# Binaries:
ssmtp: $(OBJS)
$(CC) -o ssmtp $(OBJS) @LIBS@ $(CFLAGS)

.PHONY: clean
clean:
$(RM) ssmtp *.o md5auth/*.o core

.PHONY: distclean
distclean: clean docclean
$(RM) config.* Makefile

.PHONY: docclean
docclean:
$(RM) *.dvi *.log *.aux
56 changes: 56 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Purpose and value:
This is sSMTP, a program that replaces sendmail on workstations that should
send their mail via the departmental mailhub from which they pick up their
mail (via pop, imap, rsmtp, pop_fetch, NFS... or the like). This program
accepts mail and sends it to the mailhub, optionally replacing the domain in
the From: line with a different one.

WARNING: the above is all it does. It does not receive mail, expand aliases
or manage a queue. That belongs on a mailhub with a system administrator.
The man page (ssmtp.8) and the program logic manual (ssmtp_plm) discuss the
limitations in more detail.

It uses a minimum of external configuration information, and so can be
installed by copying the (right!) binary and an optional four-line config
file to a given machine.

Type of systems supported:
Berkeley-derived, or ones otherwise using /usr/lib/sendmail as a mail transfer
agent. In use on SunOS 4.1.1, NextStep 2.x/3 and Ultrix 4.2, tested briefly on
AIX 3.2 and RISCos. Tested by others on DG U/X 5 and SVR4.

You may need to #define USE_OLD_ARPADATE for the Cygwin port of ssmtp
(otherwise the day of the month would always be the letter "d").

Dependencies:
External: Berkeley sockets and supporting libraries.

Known limitations:
This is not a complete sendmail. It is only a program to post mail to a
mailhub for people who don't *want* a complete sendmail. Therefore a lot of
flags are not supported. The old header limit of 4K is fixed and the number
of recipients is as large as can be held in memory.

Known problems:
Pine uses a lot of sophisticated options to talk to sendmail, and uses
batched SMTP input which is not supported. The solution is to use your mailhub
as smtpserver in pine.conf. If the mailhub is not reachable, sSMTP will fail.

Authors:
David Collier-Brown, davecb@hobbes.ss.org, davecb@sni.ca or dave@lethe.uucp
Christoph Lameter, clameter@debian.org, clameter@waterf.org, clameter@i-m-f.org
Hugo Haas, hugo@debian.org, hugo@larve.net, hugo@via.ecp.fr
Matt Ryan, mryan@debian.org, matt.ryan@banana.org.uk

TLS support from Tobias Rundstrom <tobi@tobi.nu>
IPv6 support from Jun-ya Kato <kato@goto.info.waseda.ac.jp>
MD5 authentication support from TAKIZAWA Takashi <aki@luna.email.ne.jp>

Current Maintainer:
Anibal Monsalve Salazar, A.Monsalve.Salazar@IEEE.org

Patchlevel:
See ssmtp.c

Copying conditions:
GNU GPL
34 changes: 34 additions & 0 deletions TLS
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Tobias Rundstrom supplied a patch to ssmtp to enable secure mailtransfer
between your local (ssmtp) machine and the mailhub. It also supports
authentication with RSA keys, to enable you to (if you patch the MTA on
the mailhub) have RSA key checks on all relay mails.

He wanted this so that he could have the same SMTP server on his laptop even
when he moved around on different networks. As he said - "I could have used
postfix as I did on my mailhub, but that was overkill, so I patched the
smallest program there was :)"

information about smtp over ssl for postfix is avalible at:
http://www.aet.tu-cottbus.de/personen/jaenicke/pfixtls

How to use this:
I had to add the following config directives:

UseTLS=YES/NO
Set this to yes and ssmtp will try to connect with SSL to the remote machine.

UseSTARTTLS=YES/NO
Do a EHLO/STARTTLS before starting the SSL negotiation (see http://www.ietf.org/rfc/rfc2487.txt).

UseTLSCert=YES/NO
Set this to yes to make ssmtp identify itself with a certificate.

TLSCert=<file>
Specify which certificate file should be used.


TODO:
* Check server certificate for changes and notify about it.
* Diffrent Certificate and Key file?


Loading

0 comments on commit 5e89737

Please sign in to comment.