apt-get install postfix libsasl2-modules
Dann weiter per Editor:
# /etc/postfix/main.cf myhostname = client.domai.tld relayhost = smtp.relayhhost.tld:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth ## ## TLS ## smtp_sasl_security_options = noanonymous smtp_tls_security_level = encrypt smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt compatibility_level = 3.6
Die Datei mit den Zugangsdaten beim entfernten SMTP Server wieder per Eidtor befüllen:
# /etc/postfix/smtp_auth smtp.relayhost.tld:587 absender@domain.tld:SuperSicheresPasswort
Die Benutzer / Passwortkombination hashen:
postmap /etc/postfix/smtp_auth
Eine Testmail von der Kommandozeile aus versenden.
echo "SMTP-Test" | mail -s "Das ist eine Test-Mail. Sie stellt sicher, dass Postfix korrekt eingerichtet ist." empfaenger@domain.tld -r absender@domain.tld
Fertig.