SMTP Protocol Error
See original GitHub issueHello guys,
we are using the proxy for IMAP to get messages from the mailbox, which is working fine. Now we are trying to send mails using smtp und we get a smtp protocal error.
Nov 2 10:51:32 shdeaahrocop01 Email OAuth 2.0 Proxy: New incoming connection to SMTP server at 192.168.16.8:1587 (unsecured) proxying smtp.office365.com:587 (SSL/TLS)
Nov 2 10:51:32 shdeaahrocop01 Email OAuth 2.0 Proxy: Accepting new connection to SMTP server at 192.168.16.8:1587 (unsecured) proxying smtp.office365.com:587 (SSL/TLS) via (‘192.168.14.75’, 41770)
Nov 2 10:51:32 shdeaahrocop01 Email OAuth 2.0 Proxy: SMTP (192.168.16.8:1587; 192.168.14.75:41770->smtp.office365.com:587) --> [ Client connected ]
Nov 2 10:51:32 shdeaahrocop01 Email OAuth 2.0 Proxy: SMTP (192.168.16.8:1587; 192.168.14.75:41770->smtp.office365.com:587) <-> [ Starting TLS handshake ]
Nov 2 10:51:32 shdeaahrocop01 Email OAuth 2.0 Proxy: Caught connection error in SMTP (192.168.16.8:1587; 192.168.14.75:41770->smtp.office365.com:587) - you have set local_certificate_path
and local_key_path
; is your client using a secure connection? Error type <class 'ssl.SSLErro>
All settings I can see are right. The connection between the sending client and the proxy is without tls or ssl. It seems like the error is while connecting to m365,
Do you have any idea or am I missing something?
For better understanding: Client: 192.168.14.75 oAuth Proxy: 192.168.16.8
The account settings are working fine for imap.
Kind regard André
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Thanks. Did the trick. I thought this parameter was set so that the client needs to use starttls to connect to the oAuth Proxy.
Ah – you’ve removed the STARTTLS setting from the example configuration file for some reason. The proxy used to detect this, but it is more complex now with the added support for various SSL configurations. I’ll think about how this could be achieved again.
Office 365’s SMTP server uses STARTTLS, and because the proxy needs to intercept the connection, it has to handle this on your behalf (see the readme). Re-adding
starttls = True
will fix this: