Postfix installieren
Erscheinungsbild
Postfix einrichten
Anleitung https://wiki.ubuntuusers.de/Postfix/
Kurzform und spezifische Konfiguration
Pakete Installieren
sudo apt-get install postfix libsasl2-modules bsd-mailx
In der Postfix-Konfig
- Satellitensystem
- Relayhost: webmail.zeberliedv.ch:25
- Akzeptierte Rechner: hetzner2, $myhostname, localhost.localdomain, localhost
übrige Einstellung auf default
Authentifizierung
ergänzen in /etc/postfix/main.cf
smtp_sasl_auth_enable = yes
- noplaintext weglassen, wenn Passwörter im Klartext übertragen werden müssen: (nicht empfohlen, nur wenn's anders nicht funktioniert)
- smtp_sasl_security_options = noplaintext noanonymous
smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
sudo touch /etc/postfix/sasl_password
in sasl_password
webmail.zeberliedv.ch noreply:PASSWORT
Datei schützen
sudo chmod 600 /etc/postfix/sasl_password
Datenbank erzeugen
sudo postmap hash:/etc/postfix/sasl_password
Postfix neustarten
sudo /etc/init.d/postfix restart
Absender setzen
ergänzen in /etc/postfix/main.cf
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sudo touch /etc/postfix/sender_canonical
in sender_canonical
www-data noreply@zeberliedv.ch
root noreply@zeberliedv.ch
Datenbank erzeugen
sudo postmap /etc/postfix/sender_canonical
Postfix neustarten
sudo /etc/init.d/postfix restart
Funktionstest
mail -s "testbetreff" email@addresse.de < testmailtext.txt
Log kontrollieren
tail -n 25 /var/log/mail.log