ich benötige wieder mal Eure Hilfe. Seit Tagen versuche ich postfix zum Versand von Mails zu bewegen, leider ohne Erfolg. Ich stelle hier mal alle relevanten Daten zusammen und hoffe, man findet Auffälligkeiten.
Noch etwas zum System und der Vorgeschichte. Bei diesem System handelt es sich um einen RaspberryPi 4 mit Nextcloud. Das System von nextcloudpi wurde vor ca. 2 Jahren installiert und immer aktualisiert. Auch das Upgrade auf Bullseye ist mal erfolgt. Also alles ist tagesaktuell. Das System hängt an einer öffentlichen festen IP mit Domainname und Letś Encrypt in meinem Büro.
Warum auch immer, zu Beginn hatte ich msmtp zum Postversand verwendet und später auch mal sendmail. Alles war ok. Durch Veränderungen meiner Provider, nun Hosteurope, musste ich in der Nextcloud einen neuen SMTP eintragen. Das war kein Problem, es lief sofort mit STARTTLS.
Ungefähr ab diesem Zeitpunkt fiel mir auf, dass die Systemmails nicht mehr versendet werden. Alles, was aus der Nextcloud-Software versendet wird, kommt aber an! Deshalb habe ich vor einigen Tagen begonnen postfix zu verwenden, installiert und msmtp vom System entfernt. Bis aktuell versendet postfix keine Mails, die Nextcloud schon.
Ich möchte meine Konfiguration hier mal vorstellen, bitte Euch diese zu kontrollieren und mich auf mögliche Fehler hinzuweisen. Das mail.log zeigt auch einen Fehler in der Verbindung mit dem SMTP. Die Einstellungen SMTP-URL, Benutzername und Kennwort habe ich mehrfach geprüft und sind auch identisch mit den Einstellungen in der Netxtcloud. Ich komme im Moment nicht weiter. Sollten Informationen fehlen, liefere ich diese gern nach.
Hostname (hostname -f):
Code: Alles auswählen
nextcloudpi
Code: Alles auswählen
nextcloudpi
main.cf:
Code: Alles auswählen
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtp_tls_CApath = /etc/ssl/certs
smtpd_tls_CApath = /etc/ssl/certs
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
mydomain = Domainname.de
myhostname = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = nextcloudpi, $myhostname, localhost.$mydomain, localhost
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = ipv4
##########################################
##### non debconf entries start here #####
##### client TLS parameters #####
smtp_tls_loglevel=1
smtp_tls_security_level=encrypt
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options = noanonymous
##### map jane@localhost to jane.doe@gmail.com #####
smtp_generic_maps=hash:/etc/postfix/generic
relayhost=[SMTP-URL]:587
Code: Alles auswählen
[SMTP-URL]:587 Benutzername:Kennwort
Code: Alles auswählen
root@nextcloudpi Versandmailadresse_vom_Provider
Code: Alles auswählen
# See man 5 aliases for format
postmaster: root
pi: root
www-data: root
root: Empfängermailadresse
Code: Alles auswählen
echo "Test to root." | mail -s "Test message to root" root
Code: Alles auswählen
tail -f /var/log/mail.log
Feb 8 10:11:38 nextcloudpi postfix/bounce[103146]: A56F4200C1: sender non-delivery notification: 26FD020241
Feb 8 10:11:38 nextcloudpi postfix/qmgr[103132]: 26FD020241: from=<>, size=2373, nrcpt=1 (queue active)
Feb 8 10:11:38 nextcloudpi postfix/qmgr[103132]: A56F4200C1: removed
Feb 8 10:11:38 nextcloudpi postfix/cleanup[103141]: 2A319200C1: message-id=<20230208091138.26FD020241@ecampus24.de>
Feb 8 10:11:38 nextcloudpi postfix/local[103143]: 26FD020241: to=<root@nextcloudpi>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (forwarded as 2A319200C1)
Feb 8 10:11:38 nextcloudpi postfix/qmgr[103132]: 2A319200C1: from=<>, size=2497, nrcpt=1 (queue active)
Feb 8 10:11:38 nextcloudpi postfix/qmgr[103132]: 26FD020241: removed
Feb 8 10:11:38 nextcloudpi postfix/smtp[103144]: Trusted TLS connection established to SMTP-URL[80.237.130.118]:587: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
Feb 8 10:11:38 nextcloudpi postfix/smtp[103144]: 2A319200C1: to=<Empfängermailadresse>, orig_to=<root@nextcloudpi>, relay=SMTP-URL[80.237.130.118]:587, delay=0.33, delays=0.01/0/0.28/0.04, dsn=5.0.0, status=bounced (host SMTP-URL[80.237.130.118] said: 550 relay not permitted (in reply to RCPT TO command))
Feb 8 10:11:38 nextcloudpi postfix/qmgr[103132]: 2A319200C1: removed
Code: Alles auswählen
said: 550 relay not permitted
mydestination.
Hat jemand eine Idee wo der Fehler liegen könnte oder wie ich mich der Ursache nähern kann?
Thomas