Table of Contents

Anleitung um einen externen SMTP-Server in Postfix zu verwenden:

1.) Postfix main.cf anpassen

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>

2.) Passwort-Datei anlegen

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.

3.) Postmap ausführen und Postfix neu starten

Folgendes starten:

<cli> # postmap hash:/etc/postfix/sasl_passwd </cli>

Postfix neu starten

<cli> # /etc/init.d/postfix restart </cli>

Wichtig: SMTP Server wie etwa smtp.googlemail.com funktionieren nicht !