Guten Tag,
ich verzweifle am E-Mail-Versand_
Ich habe 2 Postfächer getestet_
Einmal eine 1und1 Adresse und einmal eine Freemail (web_de)_
Beide Postfächer funktionieren mit Thunderbird_ Die 1und1 Adresse hat auch mit OpenHab funktioniert_
Ich habe bereits mehrere Kombinationen von Ports und Verschlüsselung getestet_ Alle ohne Erfolg_
#E-Mail
notify:
#----------------------------------------------
- name: "E-Mailbenachrichtigung"
platform: smtp
sender: !secret email_user
server: "smtp_1und1_de"
port: 465
timeout: 15
username: !secret email_user
password: !secret email_password
encryption: tls
sender_name: "HA: Wohnung"
debug: true
recipient:
- "ziel@online_de"
#----------------------------------------------
- name: "E-Mailbenachrichtigung web_de"
platform: smtp
sender: !secret email_web_user
server: "smtp_web_de"
port: 465
timeout: 15
username: !secret email_web_user
password: !secret email_web_password
encryption: tls
sender_name: "HA: Wohnung Test"
#verify_ssl: false
debug: true
recipient:
- "ziel@online_de"
In der Secrets Datei sind email und Passwort in Anführungszeichen eingegeben_
Auszug aus dem Log:
send: 'ehlo *8BuchstabenZiffern*-esphome_local_hass_io\r\n'
reply: b'250-kundenserver_de Hello *8BuchstabenZiffern*-esphome_local_hass_io [*öffentlicheIP*]\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-AUTH PLAIN LOGIN\r\n'
reply: b'250 SIZE 141557760\r\n'
reply: retcode (250); Msg: b'kundenserver_de Hello *8BuchstabenZiffern*-esphome_local_hass_io [*öffentlicheIP*]\n8BITMIME\nAUTH PLAIN LOGIN\nSIZE 141557760'
send: 'AUTH PLAIN *lange Zeichenfolge*=\r\n'
send: 'ehlo *8BuchstabenZiffern*-esphome_local_hass_io\r\n'
reply: b'250-web_de Hello *8BuchstabenZiffern*-esphome_local_hass_io [*öffentlicheIP*]\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-AUTH PLAIN LOGIN\r\n'
reply: b'250 SIZE 141557760\r\n'
reply: b'235 Authentication succeeded\r\n'
reply: retcode (250); Msg: b'web_de Hello *8BuchstabenZiffern*-esphome_local_hass_io [*öffentlicheIP*]\n8BITMIME\nAUTH PLAIN LOGIN\nSIZE 141557760'
reply: retcode (235); Msg: b'Authentication succeeded'
send: 'quit\r\n'
send: 'AUTH PLAIN *lange Zeichenfolge*=\r\n'
reply: b'221 kundenserver_de Service closing transmission channel\r\n'
reply: retcode (221); Msg: b'kundenserver_de Service closing transmission channel'
reply: b'535 Authentication credentials invalid\r\n'
reply: retcode (535); Msg: b'Authentication credentials invalid'
send: 'AUTH LOGIN *lange Zeichenfolge*==\r\n'
reply: b'334 UGFzc3dvcmQ6\r\n'
reply: retcode (334); Msg: b'UGFzc3dvcmQ6'
send: '*lange Zeichenfolge*=\r\n'
reply: b'535 Authentication credentials invalid\r\n'
reply: retcode (535); Msg: b'Authentication credentials invalid'
Bei Web_de:
554 Nemesis ESMTP Service not available Transaction failed Reject due to policy restrictions_
E-Mails werden von unserem Mailsystem abgelehnt, wenn die im E-Mail Header gemachten Angaben nicht den Vorgaben in RFC 5321 und RFC 5322 entsprechen_
Dies schließt folgende Punkte ein:
- Folgende Header müssen syntaktisch richtig sein: Date, From, Sender, To
- Die Header BCC, CC, Date, From, Sender, Subject und To dürfen nicht mehrfach vorkommen
Üblicherweise liegt in diesen Fällen ein Syntax-Fehler bei einer E-Mail-Adresse vor, die im From oder To Feld angegeben wurde_ Eine häufige Ursache sind z_B_ nicht kodierte Umlaute oder Semikola statt Kommata bei Angabe mehrerer Adressen_
Bitte prüfen Sie daher die von Ihrem System gemachten Angaben auf Richtigkeit und wenden sich ggf_ an die Administrierenden Ihres Systems_
Info der 1und1 bzw_ IONOS Seite zum Fehlercode:
554 Invalid DNS PTR resource record
Problem:
There is no domain name assigned to the IP address of the email server you are using in the Domain Name Service (DNS)_
Solution:
Add the missing DNS entry_
554 Bad DNS PTR resource record
Problem:
Email from your email server has been rejected because the [PTR resource record](L in kde_wikipedia_org/wiki/PTR_Resource_Record) (PTR-RR) of your IP address does not comply with IONOS policy_
Solution:
Switch from a dynamically assigned IP address to a fixed IP address_
Verify that the PTR-RR is the default generic entry of your provider_ Assign your email server its own full domain name (FQDN)_
554 IP address is blacklisted
Problem:
A delivery of your email was rejected due to a [DNSBL entry of](L in ken_wikipedia_org/wiki/Domain_Name_System-based_Blackhole_List) your IP_
Solution;
Contact [IONOS](L in kpostmaster-contact_ionos_com/?&utm_source=helpcenter&utm_medium=knowledge&utm_campaign=2425&utm_term=postmaster-contact&utm_content=deeplink&skipIntcpts=true) to have an incorrect entry checked_
554 Reject due to policy restrictions
Problem:
The email was rejected as it violates IONOS policy_ The sending server is mostly sending spam messages_
Solution:
Contact us [IONOS](L in kpostmaster-contact_ionos_com/?&utm_source=helpcenter&utm_medium=knowledge&utm_campaign=2425&utm_term=postmaster-contact&utm_content=deeplink&skipIntcpts=true) to have the facts of the case examined_
554 Transaction failed, reject due to policy restrictions
Problem:
The email was rejected by the IONOS SMTP server because the standards defined in [RFC 5321](L in ktools_ietf_org/html/rfc5321) and [RFC 5322](L in ktools_ietf_org/html/rfc5322) were not adhered to_
Solution:
The email client must meet the following criteria:
- The header lines of the email must contain exactly one valid “Date” line according to [RFC 2822](L in ktools_ietf_org/html/rfc2822#section-3_3)_
- The following header lines may only exist once: From, Sender, To, CC, Subject
- The header lines mentioned must be syntactically correct
Note: The To and CC lines can contain multiple recipients_
In accordance with the recommendations from [RFC7103](L in ktools_ietf_org/html/rfc7103), incorrect messages are not automatically corrected by IONOS, otherwise DKIM signatures become invalid_ For more information about DKIM signatures, see the IONOS article [Configuring DMARC Records for a Domain](L in kwww_ionos_com/help/domains/configuring-mail-servers-and-other-related-records/configuring-a-dmarc-record-for-a-domain/)_
L in k gleich https
_ sind _
Testdaten versenden:
Entwicklerwerkzeuge-> Aktionen:
über UI-Modus ein paar Testdaten eingegeben:
Als YAML für euch:
action: notify_e_mailbenachrichtigung
data:
message: test
title: test
Log:
send: ‘ehlo 8BuchstabenZahlen-esphome_local_hass_io\r\n’
reply: b’250-kundenserver_de Hello 8BuchstabenZahlen-esphome_local_hass_io [öffnetlicheIP]\r\n’
reply: b’250-8BITMIME\r\n’
reply: b’250-AUTH PLAIN LOGIN\r\n’
reply: b’250 SIZE 141557760\r\n’
reply: retcode (250); Msg: b’kundenserver_de Hello 8BuchstabenZahlen-esphome_local_hass_io [öffnetlicheIP]\n8BITMIME\nAUTH PLAIN LOGIN\nSIZE 141557760’
send: ‘AUTH PLAIN lange Zeichenfolge=\r\n’
reply: b’235 Authentication succeeded\r\n’
reply: retcode (235); Msg: b’Authentication succeeded’
send: ‘mail from:<sender@e-mail_de> size=334\r\n’
reply: b’250 Requested mail action okay, completed\r\n’
reply: retcode (250); Msg: b’Requested mail action okay, completed’
send: ‘rcpt to:<ziel@online_de>\r\n’
reply: b’250 OK\r\n’
reply: retcode (250); Msg: b’OK’
send: ‘data\r\n’
reply: b’354 Start mail input; end with \r\n’
reply: retcode (354); Msg: b’Start mail input; end with ’
data: (354, b’Start mail input; end with ')
send: b’Content-Type: text/plain; charset=“us-ascii”\r\nMIME-Version: 1_0\r\nContent-Transfer-Encoding: 7bit\r\nSubject: test\r\nTo: ziel@online_de\r\nFrom: HA: Wohnung <sender@e-mail_de>\r\nX-Mailer: Home Assistant\r\nDate: Wed, 26 Feb 2025 11:27:55 +0100\r\nMessage-Id: <174056567547_67_13042112376030071217@8BuchstabenZahlen-esphome_local_hass_io>\r\n\r\ntest\r\n\r\n’
reply: b’554-Transaction failed\r\n’
reply: b’554-Reject due to policy restrictions_\r\n’
reply: b’554 For explanation visit ht_tp_s___www_ionos_com/help/index_php?id=2425&ip=öffnetlicheIP&c=hd&r=1MUGyh-1tveyO32Qd-00L1U9\r\n’
reply: retcode (554); Msg: b’Transaction failed\nReject due to policy restrictions_\nFor explanation visit ht_tp_s___www_ionos_com/help/index_php?id=2425&ip=öffnetlicheIP&c=hd&r=1MUGyh-1tveyO32Qd-00L1U9’
data: (554, b’Transaction failed\nReject due to policy restrictions_\nFor explanation visit ht_tp_s___www_ionos_com/help/index_php?id=2425&ip=öffnetlicheIP&c=hd&r=1MUGyh-1tveyO32Qd-00L1U9’)
send: ‘rset\r\n’
reply: b’250 OK\r\n’
reply: retcode (250); Msg: b’OK’
send: ‘quit\r\n’
2025-02-26 11:27:55_749 WARNING (SyncWorker_4) [homeassistant_components_smtp_notify] SMTPException sending mail: retrying connection
reply: b’221 kundenserver_de Service closing transmission channel\r\n’
reply: retcode (221); Msg: b’kundenserver_de Service closing transmission channel’
send: ‘ehlo 8BuchstabenZahlen-esphome_local_hass_io\r\n’
reply: b’250-kundenserver_de Hello 8BuchstabenZahlen-esphome_local_hass_io [öffnetlicheIP]\r\n’
reply: b’250-8BITMIME\r\n’
reply: b’250-AUTH PLAIN LOGIN\r\n’
reply: b’250 SIZE 141557760\r\n’
reply: retcode (250); Msg: b’kundenserver_de Hello 8BuchstabenZahlen-esphome_local_hass_io [öffnetlicheIP]\n8BITMIME\nAUTH PLAIN LOGIN\nSIZE 141557760’
send: ‘AUTH PLAIN lange Zeichenfolge=\r\n’
reply: b’235 Authentication succeeded\r\n’
reply: retcode (235); Msg: b’Authentication succeeded’
send: ‘mail from:<sender@e-mail_de> size=334\r\n’
reply: b’250 Requested mail action okay, completed\r\n’
reply: retcode (250); Msg: b’Requested mail action okay, completed’
send: ‘rcpt to:<ziel@online_de>\r\n’
reply: b’250 OK\r\n’
reply: retcode (250); Msg: b’OK’
send: ‘data\r\n’
reply: b’354 Start mail input; end with \r\n’
reply: retcode (354); Msg: b’Start mail input; end with ’
data: (354, b’Start mail input; end with ')
send: b’Content-Type: text/plain; charset=“us-ascii”\r\nMIME-Version: 1_0\r\nContent-Transfer-Encoding: 7bit\r\nSubject: test\r\nTo: ziel@online_de\r\nFrom: HA: Wohnung <sender@e-mail_de>\r\nX-Mailer: Home Assistant\r\nDate: Wed, 26 Feb 2025 11:27:55 +0100\r\nMessage-Id: <174056567547_67_13042112376030071217@8BuchstabenZahlen-esphome_local_hass_io>\r\n\r\ntest\r\n\r\n’
reply: b’554-Transaction failed\r\n’
reply: b’554-Reject due to policy restrictions_\r\n’
reply: b’554 For explanation visit ht_tp_s___www_ionos_com/help/index_php?id=2425&ip=öffnetlicheIP&c=hd&r=1McGtA-1tAaR601dM-00jVnB\r\n’
reply: retcode (554); Msg: b’Transaction failed\nReject due to policy restrictions_\nFor explanation visit ht_tp_s___www_ionos_com/help/index_php?id=2425&ip=öffnetlicheIP&c=hd&r=1McGtA-1tAaR601dM-00jVnB’
data: (554, b’Transaction failed\nReject due to policy restrictions_\nFor explanation visit ht_tp_s___www_ionos_com/help/index_php?id=2425&ip=öffnetlicheIP&c=hd&r=1McGtA-1tAaR601dM-00jVnB’)
send: ‘rset\r\n’
reply: b’250 OK\r\n’
reply: retcode (250); Msg: b’OK’
send: ‘quit\r\n’
2025-02-26 11:27:56_035 WARNING (SyncWorker_4) [homeassistant_components_smtp_notify] SMTPException sending mail: retrying connection
reply: b’221 kundenserver_de Service closing transmission channel\r\n’
reply: retcode (221); Msg: b’kundenserver_de Service closing transmission channel’
send: ‘ehlo 8BuchstabenZahlen-esphome_local_hass_io\r\n’
reply: b’250-kundenserver_de Hello 8BuchstabenZahlen-esphome_local_hass_io [öffnetlicheIP]\r\n’
reply: b’250-8BITMIME\r\n’
reply: b’250-AUTH PLAIN LOGIN\r\n’
reply: b’250 SIZE 141557760\r\n’
reply: retcode (250); Msg: b’kundenserver_de Hello 8BuchstabenZahlen-esphome_local_hass_io [öffnetlicheIP]\n8BITMIME\nAUTH PLAIN LOGIN\nSIZE 141557760’
send: ‘AUTH PLAIN lange Zeichenfolge=\r\n’
reply: b’235 Authentication succeeded\r\n’
reply: retcode (235); Msg: b’Authentication succeeded’
send: ‘quit\r\n’
reply: b’221 kundenserver_de Service closing transmission channel\r\n’
reply: retcode (221); Msg: b’kundenserver_de Service closing transmission channel’
für mich sieht es so aus als wenn irgendwelche Richtlinien RFC 5321 and RFC 5322 nicht eingehalten werden ich habe keine Idee was in HomeAssistant falsch läuft_
Log:
send: 'ehlo *8BuchstabenZahlen*-esphome.local.hass.io\r\n'
reply: b'250-kundenserver.de Hello *8BuchstabenZahlen*-esphome.local.hass.io [*öffnetlicheIP*]\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-AUTH PLAIN LOGIN\r\n'
reply: b'250 SIZE 141557760\r\n'
reply: retcode (250); Msg: b'kundenserver.de Hello *8BuchstabenZahlen*-esphome.local.hass.io [*öffnetlicheIP*]\n8BITMIME\nAUTH PLAIN LOGIN\nSIZE 141557760'
send: 'AUTH PLAIN *lange Zeichenfolge*=\r\n'
reply: b'235 Authentication succeeded\r\n'
reply: retcode (235); Msg: b'Authentication succeeded'
send: 'mail from:<sender@e-mail.de> size=334\r\n'
reply: b'250 Requested mail action okay, completed\r\n'
reply: retcode (250); Msg: b'Requested mail action okay, completed'
send: 'rcpt to:<ziel@online.de>\r\n'
reply: b'250 OK\r\n'
reply: retcode (250); Msg: b'OK'
send: 'data\r\n'
reply: b'354 Start mail input; end with <CRLF>.<CRLF>\r\n'
reply: retcode (354); Msg: b'Start mail input; end with <CRLF>.<CRLF>'
data: (354, b'Start mail input; end with <CRLF>.<CRLF>')
send: b'Content-Type: text/plain; charset="us-ascii"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\nSubject: test\r\nTo: ziel@online.de\r\nFrom: HA: Wohnung <sender@e-mail.de>\r\nX-Mailer: Home Assistant\r\nDate: Wed, 26 Feb 2025 11:27:55 +0100\r\nMessage-Id: <174056567547.67.13042112376030071217@*8BuchstabenZahlen*-esphome.local.hass.io>\r\n\r\ntest\r\n.\r\n'
reply: b'554-Transaction failed\r\n'
reply: b'554-Reject due to policy restrictions.\r\n'
reply: b'554 For explanation visit ht_tp_s___www.ionos.com/help/index.php?id=2425&ip=*öffnetlicheIP*&c=hd&r=1MUGyh-1tveyO32Qd-00L1U9\r\n'
reply: retcode (554); Msg: b'Transaction failed\nReject due to policy restrictions.\nFor explanation visit ht_tp_s___www.ionos.com/help/index.php?id=2425&ip=*öffnetlicheIP*&c=hd&r=1MUGyh-1tveyO32Qd-00L1U9'
data: (554, b'Transaction failed\nReject due to policy restrictions.\nFor explanation visit ht_tp_s___www.ionos.com/help/index.php?id=2425&ip=*öffnetlicheIP*&c=hd&r=1MUGyh-1tveyO32Qd-00L1U9')
send: 'rset\r\n'
reply: b'250 OK\r\n'
reply: retcode (250); Msg: b'OK'
send: 'quit\r\n'
2025-02-26 11:27:55.749 WARNING (SyncWorker_4) [homeassistant.components.smtp.notify] SMTPException sending mail: retrying connection
reply: b'221 kundenserver.de Service closing transmission channel\r\n'
reply: retcode (221); Msg: b'kundenserver.de Service closing transmission channel'
send: 'ehlo *8BuchstabenZahlen*-esphome.local.hass.io\r\n'
reply: b'250-kundenserver.de Hello *8BuchstabenZahlen*-esphome.local.hass.io [*öffnetlicheIP*]\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-AUTH PLAIN LOGIN\r\n'
reply: b'250 SIZE 141557760\r\n'
reply: retcode (250); Msg: b'kundenserver.de Hello *8BuchstabenZahlen*-esphome.local.hass.io [*öffnetlicheIP*]\n8BITMIME\nAUTH PLAIN LOGIN\nSIZE 141557760'
send: 'AUTH PLAIN *lange Zeichenfolge*=\r\n'
reply: b'235 Authentication succeeded\r\n'
reply: retcode (235); Msg: b'Authentication succeeded'
send: 'mail from:<sender@e-mail.de> size=334\r\n'
reply: b'250 Requested mail action okay, completed\r\n'
reply: retcode (250); Msg: b'Requested mail action okay, completed'
send: 'rcpt to:<ziel@online.de>\r\n'
reply: b'250 OK\r\n'
reply: retcode (250); Msg: b'OK'
send: 'data\r\n'
reply: b'354 Start mail input; end with <CRLF>.<CRLF>\r\n'
reply: retcode (354); Msg: b'Start mail input; end with <CRLF>.<CRLF>'
data: (354, b'Start mail input; end with <CRLF>.<CRLF>')
send: b'Content-Type: text/plain; charset="us-ascii"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\nSubject: test\r\nTo: ziel@online.de\r\nFrom: HA: Wohnung <sender@e-mail.de>\r\nX-Mailer: Home Assistant\r\nDate: Wed, 26 Feb 2025 11:27:55 +0100\r\nMessage-Id: <174056567547.67.13042112376030071217@*8BuchstabenZahlen*-esphome.local.hass.io>\r\n\r\ntest\r\n.\r\n'
reply: b'554-Transaction failed\r\n'
reply: b'554-Reject due to policy restrictions.\r\n'
reply: b'554 For explanation visit ht_tp_s___www.ionos.com/help/index.php?id=2425&ip=*öffnetlicheIP*&c=hd&r=1McGtA-1tAaR601dM-00jVnB\r\n'
reply: retcode (554); Msg: b'Transaction failed\nReject due to policy restrictions.\nFor explanation visit ht_tp_s___www.ionos.com/help/index.php?id=2425&ip=*öffnetlicheIP*&c=hd&r=1McGtA-1tAaR601dM-00jVnB'
data: (554, b'Transaction failed\nReject due to policy restrictions.\nFor explanation visit ht_tp_s___www.ionos.com/help/index.php?id=2425&ip=*öffnetlicheIP*&c=hd&r=1McGtA-1tAaR601dM-00jVnB')
send: 'rset\r\n'
reply: b'250 OK\r\n'
reply: retcode (250); Msg: b'OK'
send: 'quit\r\n'
2025-02-26 11:27:56.035 WARNING (SyncWorker_4) [homeassistant.components.smtp.notify] SMTPException sending mail: retrying connection
reply: b'221 kundenserver.de Service closing transmission channel\r\n'
reply: retcode (221); Msg: b'kundenserver.de Service closing transmission channel'
send: 'ehlo *8BuchstabenZahlen*-esphome.local.hass.io\r\n'
reply: b'250-kundenserver.de Hello *8BuchstabenZahlen*-esphome.local.hass.io [*öffnetlicheIP*]\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250-AUTH PLAIN LOGIN\r\n'
reply: b'250 SIZE 141557760\r\n'
reply: retcode (250); Msg: b'kundenserver.de Hello *8BuchstabenZahlen*-esphome.local.hass.io [*öffnetlicheIP*]\n8BITMIME\nAUTH PLAIN LOGIN\nSIZE 141557760'
send: 'AUTH PLAIN *lange Zeichenfolge*=\r\n'
reply: b'235 Authentication succeeded\r\n'
reply: retcode (235); Msg: b'Authentication succeeded'
send: 'quit\r\n'
reply: b'221 kundenserver.de Service closing transmission channel\r\n'
reply: retcode (221); Msg: b'kundenserver.de Service closing transmission channel'
by HarryP: Zusammenführung Mehrfachpost (bitte “bearbeiten” Funktion nutzen)