Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
fortgeschrittene:postfix [2013/06/26 14:09] ingo_wichmann [Postfix] |
fortgeschrittene:postfix [2022/12/21 14:52] (aktuell) sh [Links] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Minimal-Konfiguration ====== | ====== Minimal-Konfiguration ====== | ||
- | Vorraussetzung für Mail ist eine korrekte [[ dns| client- ]] und [[ bind | serverseitige ]] DNS Konfiguration. | + | Vorraussetzung für Mail ist eine korrekte [[ dns| client- ]] und [[ bind | serverseitige ]] DNS Konfiguration, inkl. ''hostname -f'' |
===== Benötigte Pakete ===== | ===== Benötigte Pakete ===== | ||
Zeile 7: | Zeile 7: | ||
==== Debian ==== | ==== Debian ==== | ||
- | exim Konfigurationsdateien direkt bei der Installation von Postfix entfernen: (( entsprechende Lösung für ''aptitude'' noch gesucht. )) | + | exim Konfigurationsdateien direkt bei der Installation von Postfix entfernen: |
- | apt-get --purge install postfix | + | apt --purge install postfix |
((exim Konfigurationsdateien nach der Installation von Postfix entfernen: | ((exim Konfigurationsdateien nach der Installation von Postfix entfernen: | ||
Zeile 29: | Zeile 29: | ||
==== Postfix ==== | ==== Postfix ==== | ||
- | Setzt man die Parameter myhostname, mydestination, mynetworks und inet_interfaces auf die default-Werte zurück, sollte postfix innerhalb eines Subnetzes Mails annehmen und zustellen: | + | In der Folge werden sinnvolle Werte für ''myhostname'' und ''mydomain'' gesetzt. Und die Parameter ''mydestination'', ''inet_interfaces'', ''mynetworks'', ''smtpd_recipient_restrictions'', ''smtpd_relay_restrictions'', ''default_transport'' und ''relay_transport'' werden auf ihre default-Werte gesetzt: |
<code bash> | <code bash> | ||
- | |||
postconf -e "myhostname = $(hostname -f)" | postconf -e "myhostname = $(hostname -f)" | ||
- | postconf -e 'mynetworks = 127.0.0.0/8' | + | postconf -e "mydomain = $(hostname -d)" |
- | for PARAMETER in mydomain mydestination inet_interfaces smtpd_recipient_restrictions default_transport relay_transport; | + | |
+ | for PARAMETER in mydestination inet_interfaces mynetworks smtpd_recipient_restrictions smtpd_relay_restrictions default_transport relay_transport; | ||
do | do | ||
- | postconf -e "$(postconf -d $PARAMETER)"; | + | postconf -# $PARAMETER; |
done; | done; | ||
</code> | </code> | ||
- | /etc/init.d/postfix restart | + | service postfix restart |
Zeile 59: | Zeile 59: | ||
. | . | ||
quit | quit | ||
+ | |||
+ | ====== Destination ====== | ||
+ | postconf -d mydestination | ||
+ | postconf mydomain | ||
+ | postconf mydestination='$myhostname, $mydomain, localhost.$mydomain, localhost' | ||
+ | systemctl restart postfix.service | ||
====== Links ====== | ====== Links ====== | ||
* http://www.postfix.org | * http://www.postfix.org |