Made by KUSPBV
... is a multi-user and multi-target SMTP proxy that acts as smarthost.

Return to: Sendooway's website

Using Sendooway with getmail

If you use getmail to retrieve mails from several accounts, you might also want to use these accounts for sending outgoing mails. Configuring an own SMTP server is hard because most mail providers fight against spam and refuse communicating with private servers. A smarthost is needed to send mails, but do you know how to configure your SMTP server to use multiple smarthosts depending on the outgoing mail address? Your current setup probably includes one SMTP server for every mail identity. But why should we save passwords on several locations or reconfigure every mail client just because we changed our login information?

Better use Sendooway, if you do not need a full-blown mail server! It is able to work with your existing getmail configuration, handles authentication and relays outgoing messages to the correct smarthost. This howto shows how to integrate Sendooway into getmail.

Warning: Sendooway is currently in pre-alpha state and probably full of bugs. This howto is only meant for information on Sendooway's getmail-integration, but you should not use it in production environments. Also note, that some features of Sendooway are not yet implemented or might change in near future (e.g. naming of configuration keywords or command-line switches).

We'd be very happy if you give us feedback on Sendooway through our mailing list. Of course, and if you want, you can also participate (e.g. code, spell-check ...).

Step 0: Getmail and present setup

We think that you already know about getmail; so this paragraph is just for completeness. Here is a short description of getmail we've taken from its website:

getmail is a mail retriever designed to allow you to get your mail from one or more mail accounts on various mail servers to your local machine for reading with a minimum of fuss. getmail is designed to be secure, flexible, reliable, and easy-to-use. getmail is designed to replace other mail retrievers such as fetchmail.

In the following, I'll assume you have two mail accounts (alice@private.mail and mrs.alice@business.mail) and use getmail to download messages from both. The first account is described in getmail's default configuration file at ~/.getmail/getmailrc, the second one is configured in ~/.getmail/my-business-mails. Sendooway is a multi-user server which has to be configured by the superuser; so you will also need root access.

Step 1: Compile Sendooway

Download the latest Sendooway snapshot from, unpack and configure it. The following should work for you:
alice@localhost:~$ \
  tar xzf sendooway-*.tar.gz && \
  cd sendooway-*/ && \
  ./configure --prefix=/usr --sysconfdir=/etc
If configure stops because of missing dependencies, you can try using the --without-gnutls option; however we absolutely recommend installing GnuTLS instead, because some mail providers (like Googlemail) refuse to accept unsecured connections.

After configuring the source code, compile and install it:

alice@localhost:~$ \
  make && \
  sudo make install
Compilation should process without errors. Maybe sudo wants to know your super-user password to copy Sendooway into your GNU/Linux installation. Congratulations -- the most difficult step was just made.
Please do not distribute binary releases as long as Sendooway is pre-alpha.

Step 2: Configure Sendooway globally

Sendooway reads /etc/sendooway.conf to get global information about your system. This file was created in the last step and contains documented example values. For this howto you should replace those values with the following lines:
mailerEncryption = forbidden
userInclude = %h/.sendoowayrc
The first line disables secure server connections between your mail client and Sendooway. Outgoing connections between Sendooway and the smarthost remain encryptable. The second line restricts access to alice -- of course, you must enter your local username here. Other users won't be able to use Sendooway (if they should: remove this line or add another ValidUser line for each user). The last line tells Sendooway to include ~/.sendoowayrc after the mail client has been authenticated.

Step 3: Per-user configuration

You global configuration is ready - Fine! Now create the per-user configuration, telling Sendooway where to find your getmailrc. Open ~/.sendoowayrc in an editor and add some lines that might look as follows:
smarthostMapping = getmail:.getmail/getmailrc
smarthostMapping = getmail:.getmail/my-business-mails
Sendooway is now fully configured, but a last step is missing: both files must be adapted, because some additional information is needed to send mails. Sendooway will automatically use the existing username/password, but at least your mail address and the smarthost must be given.
To send mails over smtp.private.mail without encryption (some providers do not allow this) add the following lines to the first configuration file (e.g. ~/.getmailrc/getmailrc).
type = SimpleSMTPSender
server = smtp.private.mail
address = alice@private.mail
The second account will use TLS encryption (server certificate must already be trusted) for the outgoing server The address keyword can be given several times if more than one address belongs to this account:
type = SimpleSMTPTLSSender
server =
address = mrs.alice@business.mail
address =
Repeat this step for every user who should be able to use Sendooway, but do not forget to adapt the ValidUser setting in Step 2! Additional parameters are documented in sendooway.conf(5) (Section Using getmailrc).

Step 4: Start Sendooway

Sendooway can use a super-server daemon like xinetd or inetd. If you do not use any of these, you might want to use Sendooway's build-in server:
alice@localhost:~$ \
  sudo /usr/bin/sendooway -b submission
If you use inetd, add the following line to your /etc/inetd.conf:
submission stream tcp nowait root /usr/sbin/tcpd /usr/bin/sendooway
The preferred way is to use xinetd. Thereto, create a new text file inside an editor, name it /etc/xinetd.d/sendooway and copy'n'paste the following content:
service submission
    socket_type    = stream
    protocol       = tcp
    wait           = no
    user           = root
    server         = /usr/bin/sendooway
Sendooway will be available after your super-server daemon gets reloaded. The following command should do (replace xinetd by inetd if needed):
alice@localhost:~$ \
  sudo pkill -SIGHUP xinetd

Step 5: Configure your mail client

Curious? The very last step is to configure your mail client to use Sendooway as SMTP server. In this example we will use Thunderbird/Icedove, but we also tested Sendooway with Evolution, IMP/Horde Webmail and even K9-Mail an Android. For simplicity here is a screenshot (Menu -> Edit -> Account Settings -> Outgoing Server (SMTP)):
SMTP server in Thunderbird
Additionally, you will need to update your identities. Sendooway will choose the smarthost (the correct getmailrc) by parsing the mail address the message is sent with.

Further steps: Setup other mail clients, Create new mail accounts, Change passwords

Personally, I use three mail clients (Desktop, Smartphone, Webmail). All of them are configured to send mails with Sendooway. Changing my provider-account password means changing a single file -- I don't have to adapt every client and my getmailrc for automatically retrieval. If I want to add a new mail account, I create a new getmailrc and I'm done.


Sendooway sends configuration errors, certificate failures and such to the logging daemon. If things don't work for you, check the syslog:
alice@localhost:~$ \
  grep -i sendooway /var/log/syslog | tail
If Sendooway does not start but complains about your configuration, you're lucky (just edit your global /etc/sendooway.conf and/or the user-include). Failures caused by certificate errors are more difficult to fix. Verification is done by checking certificate authorities in /etc/ssl/certs/ca-certificates.crt. You should add unknown certificates here, if you trust the remote end. You can also use the sslCA option inside the global configuration or a user-include defining another list of trusted authorities. If you don't care about security, try replacing SimpleSMTPTLSSender with SimpleSMTPSender inside your getmailrc. Some servers do not allow unsecured authentication and Sendooway will fail again (this time for a different reason); then it's probably best to add the following configuration keyword to your getmailrc:
type = SimpleSMTPTLSSender
no_certificate_check = true

We really hope, you like Sendooway and use it to improve your every-day mail experience. This howto is a very quick one and there are much more things Sendooway can do. There are two man pages (sendooway(1) and sendooway.conf(5)) and a very long to-do list of features we want to implement in later versions.

Please let us know if you think Sendooway is useful (this motivates) or if you think Sendooway is a waste of time (this demotivates).

Valid HTML 5 CSS is valid!