====== Minimal-Konfiguration ====== Vorraussetzung für Mail ist eine korrekte [[ dns| client- ]] und [[ bind | serverseitige ]] DNS Konfiguration, inkl. ''hostname -f'' ===== Benötigte Pakete ===== SuSE, Debian, Ubuntu, RedHat: ''postfix'' ==== Debian ==== exim Konfigurationsdateien direkt bei der Installation von Postfix entfernen: apt --purge install postfix ((exim Konfigurationsdateien nach der Installation von Postfix entfernen: dpkg-query -W -f='${Package}\n' | grep exim | xargs dpkg --purge )) ===== Konfiguration ===== Der Großteil der Konfiguration spielt sich in den Dateien ''/etc/postfix/main.cf'' und ''/etc/postfix/master.cf'' ab. Die Datei ''/etc/postfix/main.cf'' kann man mit einem Editor oder über den Befehl ''postconf'' bearbeiten. ==== Postfix ==== 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: postconf -e "myhostname = $(hostname -f)" postconf -e "mydomain = $(hostname -d)" for PARAMETER in mydestination inet_interfaces mynetworks smtpd_recipient_restrictions smtpd_relay_restrictions default_transport relay_transport; do postconf -# $PARAMETER; done; postconf -e 'mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost' service postfix restart ===== Testen ===== lsof -i :25 netcat -v localhost 25 HELO localhost MAIL FROM: root@localhost RCPT TO: nutzer15@localhost DATA From: root@localhost To: nutzer15@localhost Subject: testmail Dies ist eine Testmail . quit ====== Übersichtsbild Postfix Konfiguration ====== {{ :lpi2:postfix.svg |}} Original von Michael Nausch: https://dokuwiki.nausch.org/doku.php/centos:mail_c6:mta_3 ====== Links ====== * http://www.postfix.org