This is an update to my previous post RE: sending via google SMTP relay but this time let’s use something bit more secure and private.
1. Go to http://gmx.net and set yourself up with an email account.
2. Login to your Raspberry PI as root and run:
sudo postconf -e 'relayhost = [mail.gmx.net]:587' sudo postconf -e 'smtp_sasl_auth_enable = yes' sudo postconf -e 'smtp_sasl_security_options = noanonymous' sudo postconf -e 'sender_canonical_maps = hash:/etc/postfix/sender_canonical' sudo postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd' sudo su -c 'echo "login your_email@gmx.de" > /etc/postfix/sender_canonical' sudo su -c 'echo "login@domain.net your_email@gmx.de" > /etc/postfix/sender_canonical' sudo chown root:root /etc/postfix/sender_canonical sudo chmod 0600 /etc/postfix/sender_canonical sudo postmap /etc/postfix/sender_canonical sudo su -c 'echo "[mail.gmx.net]:587 your_email@gmx.de:password" > /etc/postfix/sasl_passwd' sudo chown root:root /etc/postfix/sasl_passwd sudo chmod 0600 /etc/postfix/sasl_passwd sudo postmap /etc/postfix/sasl_passwd
now just restart postfix:
service postfix restart
and test it, run:
tail -f /var/log/mail.log
and send test mail