scanner / as_email_service

A Django app and smtp relay service for working with 3rd party email services and asimap
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Catch failures in STARTTLS (and log them) instead of throwing an exception #73

Closed scanner closed 11 months ago

scanner commented 11 months ago
smtpd   | [2023-11-08 00:24:40,461] ERROR:smtp.handle_exception: ('50.116.50.152', 61000) SMTP session exception
smtpd   | Traceback (most recent call last):
smtpd   |   File "/venv/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 914, in smtp_STARTTLS
smtpd   |     await waiter
smtpd   |   File "/usr/local/lib/python3.11/asyncio/sslproto.py", line 575, in _on_handshake_complete
smtpd   |     raise handshake_exc
smtpd   |   File "/usr/local/lib/python3.11/asyncio/sslproto.py", line 557, in _do_handshake
smtpd   |     self._sslobj.do_handshake()
smtpd   |   File "/usr/local/lib/python3.11/ssl.py", line 979, in do_handshake
smtpd   |     self._sslobj.do_handshake()
smtpd   | ssl.SSLError: [SSL: NO_SHARED_CIPHER] no shared cipher (_ssl.c:1006)
smtpd   | 
smtpd   | The above exception was the direct cause of the following exception:
smtpd   | 
smtpd   | Traceback (most recent call last):
smtpd   |   File "/venv/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 741, in _handle_client
smtpd   |     await method(arg)
smtpd   |   File "/venv/lib/python3.11/site-packages/aiosmtpd/smtp.py", line 918, in smtp_STARTTLS
smtpd   |     raise TLSSetupException() from error
smtpd   | aiosmtpd.smtp.TLSSetupException