Sendooway − a multi-user and multi-target SMTP proxy
sendooway [−h] [−V] [−s] [−S] [−c CONFIGFILE] [−b PORT] [−l LOGFILE]
Comfortable mail clients allow using more than one identity when sending an email. Often every identity comes with its own SMTP server and authentication data. You have to remember the password for every identity or store it inside your mail client. If you use more than one client (one on your desktop machie, one on your smartphone and one webmail solution), changing a password is a pain.
Tools like fetchmail(1) or getmail(1) allow to collect mails from different mail servers. You have to give them access to every account they should visit. Sendooway can use their password files to send your mails transparently. The only password you have to remember/store inside your mail client is your UNIX password. Sendooway automatically connects the correct SMTP server, logs on with your account data and sends your mail. There will never be a bounce messages because your mail client directly communicates with the remote MTA. A mail is send as soon as the procedure is finished.
Privileged root access is needed to check the password sent by the client against the PAM system. Although those privileges are dropped as soon as possible you should consider that a security issue. There are plans to run the interacting components of Sendooway as nobody and have one sendooway-authenticator which handles authentication and file access. However at the moment we rely on xinetd and do not start two processes per connection.
Sendooway uses GnuTLS (http://www.gnutls.org/) to cipher client and server connections. It uses the global system database to validate certificate chains and refuses any unsecure connection. Since Sendooway is a proxy acting as man-in-the-middle, it is up to the mail client to check Sendooway’s server certificate.
The AUTH-Extension of SMTP is supported. When authenticating on the remote side Sendooway always tries to use CRAM-MD5 and then falls back to plain text. Since we use PAM hashing can not be used on the local side, but there are plans to integrate Kerberos.
Sendooway does not solve a problem, it only moves it. You only have to remember/save one password on your mail client. If someone steals your notebook or phone then your passwords are still safely stored on your private server. If you use getmail, fetchmail or even any other (pseudo) proxy solution (like Exim with multiple smarthosts) your passwords are already available ;)
Per default Sendooway is started as root by xinetd(1) or any other super-server daemon when the mail client is establishing a connection. With the −−bind argument, Sendooway can also listen for incoming connections by itself. It then asks PAM to authenticate against the local user database, reads your ~/.sendoowayrc, ~/.fetchmailrc and/or getmailrc-files and redirects all incoming and outgoing traffic to your specific SMTP server. Thereby Sendooway does not violate any protocol specification.
For use-case examples on how to start Sendooway see section EXAMPLES below.
−h −-help
just display a short help text
−S −-nossl
consider connection safe (disable STARTTLS command)
If a super-server already encrypts the connection, Sendooway must refuse to initialize a second handshake. This option notifies Sendooway that it must not insist on the STARTTLS command neither allow its use. It also overrides the global ForceClientEncryption config option.
−s −-ssl
immediately start the SSL handshake (use for SMTPS)
If neither --ssl nor --nossl are given it is up to the client to start the TLS handshake by sending the STARTTLS command. Nevertheless you can instruct Sendooway to fail on unencrypted channels.
−c −-config CONFIGFILE
load configuration from CONFIGFILE (default: /etc/sendooway.conf). See sendooway.conf(5) for an example.
−b −-bind PORT
bind and listen on tcp port PORT
−l −-log LOGFILE
do not use syslog but append log data to LOGFILE
−V −-version
print program version and exit
For testing purposes Sendooway can be started without an additional configuration file. The following reads client data from stdin, writes SMTP responses to stdout and sends logging output to stdout.
sendooway -c /dev/null -l \&2
The following example instructs Sendooway to bind on port 587 listening for incoming tcp connections. Additionally, logging output is appended to a system-wide logfile:
sendooway -b 587 -l /var/log/sendooway.log
At the moment it is best to start Sendooway by a super-server daemon. For xinetd a valid configuration block could look like this:
service
submission
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/sendooway
}
And another example for inetd:
submission stream tcp nowait root /usr/sbin/tcpd sendooway
If xinetd/inetd should listen on port 25 instead submission has to be replaced by smtp.
Michael Kammer
sendooway.conf(5), fetchmail(1), getmail(1)
For the feature list and some default configuration files have a look at Sendooway’s beautiful homepage at http://www.kuspbv.de/sendooway/