From hartmann-micha at web.de Sun Jan 9 13:17:04 2022 From: hartmann-micha at web.de (Michael Hartmann) Date: Sun, 9 Jan 2022 13:17:04 +0100 Subject: Konfiguration von Postfix als SMTP-Relay Message-ID: <004901d80552$d06a3c70$713eb550$@web.de> Hallo, ich hoffe das die mailing-list noch aktiv ist und ich hier Hilfe finde. Ich habe einen ESP8266 mit ESPeasy der mir auf bestimmte Events Emails senden soll. Da er kein TLS beherscht, web.de aber nur gesicherte Verbindungen über port 587 akzeptiert, möchte ich Postfix als SMTP-Relay einsetzen. Ich habe Postfix auf einem Raspberry installiert und wie folgt konfiguriert: # 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 (Raspbian) 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 readme_directory = no # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on # fresh installs. compatibility_level = 2 # TLS parameters smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache #additions 2022-01-09 smtp_enforce_tls = yes smtp_tls_enforce_peername = no smtpd_tls_security_level = may # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = SmartMeterTS.fritz.box alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydestination = $myhostname, SmartmeterTS, SmartMeterTS, localhost.localdomain, localhost relayhost = smtp.web.de:587 mynetworks = 127.0.0.0/8 192.168.178.30 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all # changes 2022-01-09 inet_protocols = ipv4 # additions 2022-01-09 smtp_sasl_auth_enable = yes sender_canonical_maps = hash:/etc/postfix/sender_canonical smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous Die Dateien sasl_passwd und sender_canonical sind angelegt und konvertiert. Die Zugangsdaten darin sind korrekt! Dennoch scheint die Authentifizierung beii web.de fehlzuschlagen, wenn ich vom Raspi eine Test-email versende: echo "Das ist der E-Mail Inhalt!" | mail -s "Postfix Test" -a "From: Pi" mihartmann at gmx.de Auszug aus /var/log/mail.log: Jan 9 12:32:15 SmartMeterTS postfix/pickup[4506]: 58CB47BCD3: uid=1000 from= Jan 9 12:32:15 SmartMeterTS postfix/cleanup[4515]: 58CB47BCD3: message-id=<20220109113215.58CB47BCD3 at SmartMeterTS.fritz.box> Jan 9 12:32:15 SmartMeterTS postfix/qmgr[4507]: 58CB47BCD3: from=, size=372, nrcpt=1 (queue active) Jan 9 12:32:15 SmartMeterTS postfix/smtp[4517]: 58CB47BCD3: to=, relay=smtp.web.de[213.165.67.124]:587, delay=0.35, delays=0.07/0.12/0.15/0.01, dsn=5.0.0, status=bounced (host smtp.web.de[213.165.67.124] said: 530 Authentication required (in reply to MAIL FROM command)) Jan 9 12:32:15 SmartMeterTS postfix/cleanup[4515]: B09467BCD6: message-id=<20220109113215.B09467BCD6 at SmartMeterTS.fritz.box> Jan 9 12:32:15 SmartMeterTS postfix/bounce[4519]: 58CB47BCD3: sender non-delivery notification: B09467BCD6 Jan 9 12:32:15 SmartMeterTS postfix/qmgr[4507]: B09467BCD6: from=<>, size=2411, nrcpt=1 (queue active) Jan 9 12:32:15 SmartMeterTS postfix/qmgr[4507]: 58CB47BCD3: removed Jan 9 12:32:15 SmartMeterTS postfix/smtp[4517]: B09467BCD6: to=, relay=smtp.web.de[213.165.67.108]:587, delay=0.16, delays=0.01/0/0.14/0.01, dsn=5.0.0, status=bounced (host smtp.web.de[213.165.67.108] said: 530 Authentication required (in reply to MAIL FROM command)) Jan 9 12:32:15 SmartMeterTS postfix/qmgr[4507]: B09467BCD6: removed Kann mir jemand sagen, wo der Fehler in meiner Konfiguration liegt? Grüße Micha -------------- nächster Teil -------------- Ein Dateianhang mit HTML-Daten wurde abgetrennt... URL: From jf at fahrner.name Sun Jan 9 14:21:30 2022 From: jf at fahrner.name (J. Fahrner) Date: Sun, 09 Jan 2022 14:21:30 +0100 Subject: Konfiguration von Postfix als SMTP-Relay In-Reply-To: <004901d80552$d06a3c70$713eb550$@web.de> References: <004901d80552$d06a3c70$713eb550$@web.de> Message-ID: <9c1b918ad16a905b23882d6026df210c@fahrner.name> Wo hast du denn die Zugangsdaten für deinen web.de Account konfiguriert? Vielleicht hilft dir die Anleitung weiter: https://legacy.thomas-leister.de/postfix-als-smarthost-mail-relay-fuer-andere-server/ Am 2022-01-09 13:17, schrieb Michael Hartmann: > Hallo, > > ich hoffe das die mailing-list noch aktiv ist und ich hier Hilfe finde. > > Ich habe einen ESP8266 mit ESPeasy der mir auf bestimmte Events Emails > senden soll. Da er kein TLS beherscht, web.de aber nur gesicherte > Verbindungen über port 587 akzeptiert, möchte ich Postfix als > SMTP-Relay einsetzen. > > Ich habe Postfix auf einem Raspberry installiert und wie folgt > konfiguriert: > > # 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 (Raspbian) > > 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 > > readme_directory = no > > # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 > on > > # fresh installs. > > compatibility_level = 2 > > # TLS parameters > > smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem > > smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key > > smtpd_use_tls = yes > > smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache > > smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache > > #additions 2022-01-09 > > smtp_enforce_tls = yes > > smtp_tls_enforce_peername = no > > smtpd_tls_security_level = may > > # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package > for > > # information on enabling SSL in the smtp client. > > smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated > defer_unauth_destination > > myhostname = SmartMeterTS.fritz.box > > alias_maps = hash:/etc/aliases > > alias_database = hash:/etc/aliases > > mydestination = $myhostname, SmartmeterTS, SmartMeterTS, > localhost.localdomain, localhost > > relayhost = smtp.web.de:587 > > mynetworks = 127.0.0.0/8 192.168.178.30 [::ffff:127.0.0.0]/104 > [::1]/128 > > mailbox_size_limit = 0 > > recipient_delimiter = + > > inet_interfaces = all > > # changes 2022-01-09 > > inet_protocols = ipv4 > > # additions 2022-01-09 > > smtp_sasl_auth_enable = yes > > sender_canonical_maps = hash:/etc/postfix/sender_canonical > > smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd > > smtp_sasl_security_options = noanonymous > > Die Dateien sasl_passwd und sender_canonical sind angelegt und > konvertiert. Die Zugangsdaten darin sind korrekt! > > Dennoch scheint die Authentifizierung beii web.de fehlzuschlagen, wenn > ich vom Raspi eine Test-email versende: > > echo "Das ist der E-Mail Inhalt!" | mail -s "Postfix Test" -a "From: > Pi" mihartmann at gmx.de > > Auszug aus /var/log/mail.log: > > Jan 9 12:32:15 SmartMeterTS postfix/pickup[4506]: 58CB47BCD3: uid=1000 > from= > > Jan 9 12:32:15 SmartMeterTS postfix/cleanup[4515]: 58CB47BCD3: > message-id=<20220109113215.58CB47BCD3 at SmartMeterTS.fritz.box> > > Jan 9 12:32:15 SmartMeterTS postfix/qmgr[4507]: 58CB47BCD3: > from=, size=372, nrcpt=1 (queue active) > > Jan 9 12:32:15 SmartMeterTS postfix/smtp[4517]: 58CB47BCD3: > to=, relay=smtp.web.de[213.165.67.124]:587, > delay=0.35, delays=0.07/0.12/0.15/0.01, dsn=5.0.0, status=bounced (host > smtp.web.de[213.165.67.124] said: 530 Authentication required (in reply > to MAIL FROM command)) > > Jan 9 12:32:15 SmartMeterTS postfix/cleanup[4515]: B09467BCD6: > message-id=<20220109113215.B09467BCD6 at SmartMeterTS.fritz.box> > > Jan 9 12:32:15 SmartMeterTS postfix/bounce[4519]: 58CB47BCD3: sender > non-delivery notification: B09467BCD6 > > Jan 9 12:32:15 SmartMeterTS postfix/qmgr[4507]: B09467BCD6: from=<>, > size=2411, nrcpt=1 (queue active) > > Jan 9 12:32:15 SmartMeterTS postfix/qmgr[4507]: 58CB47BCD3: removed > > Jan 9 12:32:15 SmartMeterTS postfix/smtp[4517]: B09467BCD6: > to=, relay=smtp.web.de[213.165.67.108]:587, > delay=0.16, delays=0.01/0/0.14/0.01, dsn=5.0.0, status=bounced (host > smtp.web.de[213.165.67.108] said: 530 Authentication required (in reply > to MAIL FROM command)) > > Jan 9 12:32:15 SmartMeterTS postfix/qmgr[4507]: B09467BCD6: removed > > Kann mir jemand sagen, wo der Fehler in meiner Konfiguration liegt? > > Grüße > > Micha -------------- nächster Teil -------------- Ein Dateianhang mit HTML-Daten wurde abgetrennt... URL: -------------- nächster Teil -------------- Ein Dateianhang mit Binärdaten wurde abgetrennt... Dateiname : 0xA9189208.asc Dateityp : application/pgp-keys Dateigröße : 5499 bytes Beschreibung: nicht verfügbar URL : From Walter.H at mathemainzel.info Sun Jan 9 16:29:55 2022 From: Walter.H at mathemainzel.info (Walter H.) Date: Sun, 9 Jan 2022 16:29:55 +0100 Subject: Konfiguration von Postfix als SMTP-Relay In-Reply-To: <004901d80552$d06a3c70$713eb550$@web.de> References: <004901d80552$d06a3c70$713eb550$@web.de> Message-ID: <723df874-04cf-71f0-cb00-7fad4f858cff@mathemainzel.info> Hallo, dein sasl_passwd sieht so aus absender-email          userid:passwd (die userid selbst darf eine E-mail-adresse sein) und dein  sender_canonical beinhaltet nicht zufällig diese absender-email? habe den Verdacht, dass es zu keiner Authentifizierung kommt; Walter On 09.01.2022 13:17, Michael Hartmann wrote: > > Hallo, > > ich hoffe das die mailing-list noch aktiv ist und ich hier Hilfe finde. > > Ich habe einen ESP8266 mit ESPeasy der mir auf bestimmte Events Emails > senden soll. Da er kein TLS beherscht, web.de aber nur gesicherte > Verbindungen über port 587 akzeptiert, möchte ich Postfix als > SMTP-Relay einsetzen. > > Ich habe Postfix auf einem Raspberry installiert und wie folgt > konfiguriert: > > # 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 (Raspbian) > > 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 > > readme_directory = no > > # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on > > # fresh installs. > > compatibility_level = 2 > > # TLS parameters > > smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem > > smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key > > smtpd_use_tls = yes > > smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache > > smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache > > #additions 2022-01-09 > > smtp_enforce_tls = yes > > smtp_tls_enforce_peername = no > > smtpd_tls_security_level = may > > # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for > > # information on enabling SSL in the smtp client. > > smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated > defer_unauth_destination > > myhostname = SmartMeterTS.fritz.box > > alias_maps = hash:/etc/aliases > > alias_database = hash:/etc/aliases > > mydestination = $myhostname, SmartmeterTS, SmartMeterTS, > localhost.localdomain, localhost > > relayhost = smtp.web.de:587 > > mynetworks = 127.0.0.0/8 192.168.178.30 [::ffff:127.0.0.0]/104 [::1]/128 > > mailbox_size_limit = 0 > > recipient_delimiter = + > > inet_interfaces = all > > # changes 2022-01-09 > > inet_protocols = ipv4 > > # additions 2022-01-09 > > smtp_sasl_auth_enable = yes > > sender_canonical_maps = hash:/etc/postfix/sender_canonical > > smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd > > smtp_sasl_security_options = noanonymous > > Die Dateien sasl_passwd und sender_canonical sind angelegt und > konvertiert. Die Zugangsdaten darin sind korrekt! > > Dennoch scheint die Authentifizierung beii web.de fehlzuschlagen, wenn > ich vom Raspi eine Test-email versende: > > echo "Das ist der E-Mail Inhalt!" | mail -s "Postfix Test" -a "From: > Pi" mihartmann at gmx.de > > Auszug aus /var/log/mail.log: > > Jan  9 12:32:15 SmartMeterTS postfix/pickup[4506]: 58CB47BCD3: > uid=1000 from= > > Jan  9 12:32:15 SmartMeterTS postfix/cleanup[4515]: 58CB47BCD3: > message-id=<20220109113215.58CB47BCD3 at SmartMeterTS.fritz.box> > > Jan  9 12:32:15 SmartMeterTS postfix/qmgr[4507]: 58CB47BCD3: > from=, size=372, nrcpt=1 (queue active) > > Jan  9 12:32:15 SmartMeterTS postfix/smtp[4517]: 58CB47BCD3: > to=, relay=smtp.web.de[213.165.67.124]:587, > delay=0.35, delays=0.07/0.12/0.15/0.01, dsn=5.0.0, status=bounced > (host smtp.web.de[213.165.67.124] said: 530 Authentication required > (in reply to MAIL FROM command)) > > Jan  9 12:32:15 SmartMeterTS postfix/cleanup[4515]: B09467BCD6: > message-id=<20220109113215.B09467BCD6 at SmartMeterTS.fritz.box> > > Jan  9 12:32:15 SmartMeterTS postfix/bounce[4519]: 58CB47BCD3: sender > non-delivery notification: B09467BCD6 > > Jan  9 12:32:15 SmartMeterTS postfix/qmgr[4507]: B09467BCD6: from=<>, > size=2411, nrcpt=1 (queue active) > > Jan  9 12:32:15 SmartMeterTS postfix/qmgr[4507]: 58CB47BCD3: removed > > Jan  9 12:32:15 SmartMeterTS postfix/smtp[4517]: B09467BCD6: > to=, relay=smtp.web.de[213.165.67.108]:587, > delay=0.16, delays=0.01/0/0.14/0.01, dsn=5.0.0, status=bounced (host > smtp.web.de[213.165.67.108] said: 530 Authentication required (in > reply to MAIL FROM command)) > > Jan  9 12:32:15 SmartMeterTS postfix/qmgr[4507]: B09467BCD6: removed > > Kann mir jemand sagen, wo der Fehler in meiner Konfiguration liegt? > > Grüße > > Micha > -------------- nächster Teil -------------- Ein Dateianhang mit HTML-Daten wurde abgetrennt... URL: -------------- nächster Teil -------------- Ein Dateianhang mit Binärdaten wurde abgetrennt... Dateiname : smime.p7s Dateityp : application/pkcs7-signature Dateigröße : 3550 bytes Beschreibung: S/MIME Cryptographic Signature URL : From dirk at ilmondoegran.de Sun Jan 30 23:03:50 2022 From: dirk at ilmondoegran.de (=?UTF-8?Q?Dirk_V=c3=b6llger?=) Date: Sun, 30 Jan 2022 23:03:50 +0100 Subject: Virtualmailboxes und transport_maps Message-ID: <8e5e0532-a67f-c89d-ea4d-441ffb4f40b5@ilmondoegran.de> Hallo, aufgrund von Problemen bei der Zustellung an Microsoft Domains (outlook, hotmail, live etc) möchte ich an diese Empfänger über eienen anderen smtp server verschicken und nutzte dafür folgendes Tutorial. https://www.linuxbabe.com/mail-server/postfix-transport-map-relay-map-flexible-email-delivery Da ich aber virtuelle mailboxen nutze wird die transport_maps nicht gelesen. Gibt es eine Möglichkeit, auch mit virtuellen mailboxen einen solchen relay hinzukriegen? Danke und Grüße From postifix-users at itmania.org Mon Jan 31 17:26:07 2022 From: postifix-users at itmania.org (Christian Arndt) Date: Mon, 31 Jan 2022 17:26:07 +0100 Subject: Virtualmailboxes und transport_maps In-Reply-To: <8e5e0532-a67f-c89d-ea4d-441ffb4f40b5@ilmondoegran.de> References: <8e5e0532-a67f-c89d-ea4d-441ffb4f40b5@ilmondoegran.de> Message-ID: <26e10ec4179b036f93f117d7f611d5b6@itmania.org> Am 2022-01-30 23:03, schrieb Dirk Völlger: > Hallo, > > aufgrund von Problemen bei der Zustellung an Microsoft Domains > (outlook, hotmail, live etc) möchte ich an diese Empfänger über eienen > anderen smtp server verschicken und nutzte dafür folgendes Tutorial. > > https://www.linuxbabe.com/mail-server/postfix-transport-map-relay-map-flexible-email-delivery > > Da ich aber virtuelle mailboxen nutze wird die transport_maps nicht > gelesen. Gibt es eine Möglichkeit, auch mit virtuellen mailboxen einen > solchen relay hinzukriegen? > > Danke und Grüße Hallo, Ich wuesste nicht warum die transport_maps nicht ausgelesen werden sollte. Falls dem so ist wuerde mich dringend interessieren warum. > main.cf transport_maps = hash:/etc/postfix/transport_maps > transport_maps example.com smtp:[1.1.1.1]:25 # Erfordert Authentifizierung durch SASL, wegen 587 example.net smtp:[smtp-relay.gmail.com]:587 example.de discard:EXAMPLE_DOT_DE_TRASH > postmap transport_maps && postfix reload Danach sollte example.com und example.net über google laufen. example.de wird "discarded". VGC