Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
|
fortgeschrittene:postfix [2015/06/10 12:41] ingo_wichmann [Postfix] |
fortgeschrittene:postfix [2026/01/23 12:03] (aktuell) |
||
|---|---|---|---|
| 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 ===== | ||
| - | SuSE, Debian, RedHat: | + | SuSE, Debian, Ubuntu, RedHat: ''postfix'' |
| - | postfix | + | |
| ==== 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: | ||
| dpkg-query -W -f='${Package}\n' | grep exim | xargs dpkg --purge | dpkg-query -W -f='${Package}\n' | grep exim | xargs dpkg --purge | ||
| )) | )) | ||
| - | ==== SuSE ==== | ||
| - | SuSE hat seine eigenen Vorstellungen, wie man Postfix konfiguriert. Wenn man die Konfiguration aber nicht ''yast'' überlassen möchte, muß man die Datei ''/etc/sysconfig/mail'' anpassen: | ||
| - | <file> | ||
| - | MAIL_CREATE_CONFIG="no" | ||
| - | </file> | ||
| - | |||
| - | ==== RedHat ==== | ||
| - | Für RedHat wird auch das Paket ''system-switch-mail'' empfohlen | ||
| ===== Konfiguration ===== | ===== Konfiguration ===== | ||
| Zeile 29: | Zeile 20: | ||
| ==== Postfix ==== | ==== Postfix ==== | ||
| - | In der Folge werden sinnvolle Werte für ''myhostname'', ''mydomain'' und ''mynetworks'' gesetzt. Und die Parameter ''mydestination'', ''inet_interfaces'', ''smtpd_recipient_restrictions'', ''default_transport'' und ''relay_transport'' werden auf die default-Werte gesetzt: | + | 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 "mydomain = $(hostname -d)" | postconf -e "mydomain = $(hostname -d)" | ||
| - | postconf -e 'mynetworks = 127.0.0.0/8 [::1]/128' | ||
| - | for PARAMETER in 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; | ||
| + | postconf -e 'mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost' | ||
| </code> | </code> | ||
| - | /etc/init.d/postfix restart | + | service postfix restart |
| Zeile 61: | Zeile 51: | ||
| . | . | ||
| quit | quit | ||
| + | |||
| + | |||
| + | ====== Übersichtsbild Postfix Konfiguration ====== | ||
| + | {{ :lpi2:postfix.svg |}} | ||
| + | Original von Michael Nausch: https://dokuwiki.nausch.org/doku.php/centos:mail_c6:mta_3 | ||
| ====== Links ====== | ====== Links ====== | ||
| * http://www.postfix.org | * http://www.postfix.org | ||