Hallo zusammen, ich habe ein Problem mit postfix.
Das betrifft nicht nur meinen Pi3 sondern unter anderem auch mein Arch Linux da ich die gleich Konfiguration nutze. Ich kann mir nicht erklären was an postfix falsch eingestellt ist und hoffe ihr könnt mir helfen.
Ich nutze meinen Pi3 als Backup Server mittels rsnapshot. Kommt es bei rsnapshot zu einem Fehler bspw. weil rsnapshot sich nicht per SSH verbinden kann, wird ein systemd Prozess gestartet, der eine Mail an mich versenden soll. Dazu nutze ich postfix als Satellitensystem.
Nun habe ich den Raspberry Pi neu installiert und erhalte eine Fehlermeldung, wenn ich eine E-Mail mittels echo "Test" | mail -s "Body" markus.pesch[at]cryptic.systems
(E-Mail escaped) versenden möchte.
Fehlermeldung: Nov 13 14:09:54 tartaros postfix/smtp[8997]: A1FD23DB9F: to=<markus.pesch[at]cryptic.systems>, relay=none, delay=84459, delays=84459/0.1/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=smtp1.cryptic.systems type=MX: Host not found, try again)
Doch ein dig MX cryptic.systems
liefert mir meinen richtigen Mailserver zurück.
root@tartaros:~# dig MX cryptic.systems +short 10 smtp1.cryptic.systems.
Auch die IPv4- und IPv6-Adresse kann der Pi mittels DNS auflösen.
root@tartaros:~# dig A smtp1.cryptic.systems +short 87.138.221.146 root@tartaros:~# dig AAAA smtp1.cryptic.systems +short 2003:a:c7d:1500:5054:ff:fea2:b30a
Ich nutze auf dem Pi als auch unter Arch Linux den Dienst systemd-resolved um meine /etc/resolv.conf
Datei zu erstellen.
root@tartaros:~# cat /etc/resolv.conf # This file is managed by systemd-resolved(8). Do not edit. # # This is a dynamic resolv.conf file for connecting local clients directly to # all known DNS servers. # # Third party programs must not access this file directly, but only through the # symlink at /etc/resolv.conf. To manage resolv.conf(5) in a different way, # replace this symlink by a static file or a different symlink. # # See systemd-resolved.service(8) for details about the supported modes of # operation for /etc/resolv.conf. nameserver 192.168.178.1 search cryptic.systems
Ich nutze die Postfix-Version 3.1.6.
root@tartaros:~# dpkg --list | grep postfix ii postfix 3.1.6-0+deb9u1 armhf High-performance mail transport agent ii postfix-sqlite 3.1.6-0+deb9u1 armhf SQLite map support for Postfix
Hier meine Konfiguration von Postfix main.cf
root@tartaros:~# postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no inet_interfaces = loopback-only mailbox_size_limit = 0 mydestination = tartaros.cryptic.local, tartaros.fritz.box, localhost.fritz.box, localhost myhostname = tartaros.cryptic.local mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = smtp1.cryptic.systems sender_canonical_maps = hash:/etc/postfix/sender_canonical smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_password smtp_sasl_security_options = noanonymous smtp_tls_security_level = may smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Raspbian) smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes
Ich hoffe ihr könnt mir weiterhelfen und mir einen Tipp geben, warum ich diese Fehlermeldung erhalte.
Volker
PS: Der Mailserver (smtp1.cryptic.systems) funktioniert wunderbar. Er kann Mails versenden und Mails empfangen.