Anleitung um einen externen SMTP-Server in Postfix zu verwenden:
Mit einem Editor /etc/postfix/main.cf öffnen und folgende Zeilen einfügen:
<cli> relayhost = smtp.domain.tld smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_sasl_mechanism_filter = plain, login </cli>
Mit einem Editor /etc/postfix/sasl_passwd öffnen und folgendes einfügen:
<cli> smtp.domain.tld username:password </cli> Dort sollte natürlich der Mailserver, Benutzername und Passwort hinein.
Folgendes starten:
<cli> # postmap hash:/etc/postfix/sasl_passwd </cli>
<cli> # /etc/init.d/postfix restart </cli>
Wichtig: SMTP Server wie etwa smtp.googlemail.com funktionieren nicht !