Thanks for your huge help. I will try to configure everything…just one last thing about the Log. I think there is some error even though I seem to receive the email.
warn("Requiring AUTH while not requiring TLS "
auth_required == True but auth_require_tls == False
2023-02-23 16:29:58,452 - smtp2mqtt - INFO - main thread - dummy-authenticating whatever credentials are offered...
Session.login_data is deprecated and will be removed in version 2.0
2023-02-23 16:29:58,546 - smtp2mqtt - INFO - ca2db341 - Message from [email protected]
2023-02-23 16:29:58,548 - smtp2mqtt - DEBUG - ca2db341 - Message data (truncated): From: ""<[email protected]>
To: <[email protected]>
Subject: =?UTF-8?B?VGVzdCBlLW1haWw=?=
Mime-Version: 1.0
Content-Type: multipart/mixed;
boundary=PartBoundary12345678
--PartBoundary12345678
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
SWYgeW91IHJlY2VpdmUgdGhpcyBlLW1haWwgeW91IGhhdmUgc3VjY2Vzc2Z1bGx5IHNldCB1cCBhbmQgdGVzdGVkIHRoZSBlLW1haWwgYWxlcnQgZnJvbSB5b3VyIElQQw==
--PartBoundary12345678--
2023-02-23 16:29:58,600 - smtp2mqtt - DEBUG - ca2db341 - got message header From: [email protected]
2023-02-23 16:29:58,600 - smtp2mqtt - DEBUG - ca2db341 - got message header To: [email protected]
2023-02-23 16:29:58,601 - smtp2mqtt - DEBUG - ca2db341 - got message header Subject: Test e-mail
2023-02-23 16:29:58,601 - smtp2mqtt - DEBUG - ca2db341 - got message header Mime-Version: 1.0
2023-02-23 16:29:58,602 - smtp2mqtt - DEBUG - ca2db341 - got message header Content-Type: multipart/mixed; boundary="PartBoundary12345678"
2023-02-23 16:29:58,607 - smtp2mqtt - DEBUG - ca2db341 - got body header Content-Type: text/plain; charset="utf-8"
2023-02-23 16:29:58,607 - smtp2mqtt - DEBUG - ca2db341 - got body header Content-Transfer-Encoding: base64
2023-02-23 16:29:58,612 - smtp2mqtt - DEBUG - ca2db341 - stored [If you receive this e-mail you have successfully set up and tested the e-mail alert from your IPC] as the content
2023-02-23 16:29:58,615 - smtp2mqtt - DEBUG - ca2db341 - Publishing [{"uuid": "ca2db341", "headers": {"from": "[email protected]", "to": "[email protected]", "subject": "Test e-mail", "mime-version": "1.0", "content-type": "multipart/mixed; boundary=\"PartBoundary12345678\""}, "mime_parts": [{"best_guess": "message body", "headers": {"content-type": "text/plain; charset=\"utf-8\"", "content-transfer-encoding": "base64"}, "content": "If you receive this e-mail you have successfully set up and tested the e-mail alert from your IPC"}, {"best_guess": "message body", "headers": {"content-type": "text/plain; charset=\"utf-8\"", "content-transfer-encoding": "base64"}, "content": "If you receive this e-mail you have successfully set up and tested the e-mail alert from your IPC"}]}] to smtp2mqtt/[email protected]
2023-02-23 16:29:59,551 - smtp2mqtt - ERROR - ca2db341 - Failed publishing
Traceback (most recent call last):
File "/app/smtp2mqtt.py", line 152, in mqtt_publish
publish.single(
File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 240, in single
multiple([msg], hostname, port, client_id, keepalive, will, auth, tls,
File "/usr/lib/python3.10/site-packages/paho/mqtt/publish.py", line 176, in multiple
client.connect(hostname, port, keepalive)
File "/usr/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect
return self.reconnect()
File "/usr/lib/python3.10/site-packages/paho/mqtt/client.py", line 1044, in reconnect
sock = self._create_socket_connection()
File "/usr/lib/python3.10/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
File "/usr/lib/python3.10/socket.py", line 824, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve
2023-02-23 16:29:59,571 - smtp2mqtt - DEBUG - ca2db341 - SKIP relaying the original email