Use your Uberspace server as relay host for your local postfix instance

Here are the instructions for letting your home server send e-mails with help of your Uberspace account. This small guide is based on Ubuntu 13.04. I assume your Uberspace username is $USUSER and your Uberspace host is $USHOST.

Setup an additional mail address


 ssh $USUSER@$
 vadduser local-server
 # enter a non-trivial password
 # the address "local-server" is now available via $

Setup postfix

apt-get install postfix libsasl2-modules bsd-mailx
# choose "Satellite System" for Postfix server type

Change /etc/postfix/

myhostname =
mydestination =, localhost
relayhost = $
smtp_sasl_auth_enable = true
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password

Add your newly created mail account

touch /etc/postfix/sasl_password
chmod 600 /etc/postfix/sasl_password
vim /etc/postfix/sasl_password
# add the following line
# :wq
service postfix restart

Send a test mail

mail -s "Test" -- -f root@local-server.internal

tail -f /var/log/syslog should now contain something like

Aug 10 19:52:26 srv postfix/qmgr[11620]: 63EDB13C0F83: from=<root@local-server.internal>, size=309, nrcpt=1 (queue active)
Aug 10 19:52:26 srv postfix/smtp[11626]: connect to $[2001:1a50:11:0:xx:yy:zz:x]:587: Network is unreachable
Aug 10 19:52:26 srv postfix/smtp[11626]: 63EDB13C0F83: to=<>, relay=$[95.143.xx.yy]:587, delay=0.64, delays=0.26/0.12/0.19/0.07, dsn=2.0.0, status=sent (250 ok 1376157144 qp 15391)
Aug 10 19:52:26 srv postfix/qmgr[11620]: 63EDB13C0F83: removed

The Network is unreachable is not important, because I don’t have IPv6 enabled.