simonrob / email-oauth2-proxy

An IMAP/POP/SMTP proxy that transparently adds OAuth 2.0 authentication for email clients that don't support this method.
Apache License 2.0
786 stars 84 forks source link

email-oauth2-proxy and mbsync #233

Closed anbanpillay closed 5 months ago

anbanpillay commented 5 months ago

Hi

Is there a working configuration with the proxy and mbsync (isync) on mac os? Or could you point to one? Or any tips. My mbsync config is something like this `IMAPAccount work Host 127.0.0.1 Port 1993 User someone@someplave

SSLVersion TLSv1.2

AuthMechs LOGIN

Timeout 120 PipelineDepth 1`

The commented out lines was an attempt to get this to work. What am I missing. The gui says no Pending authorisation events. and this is the output from the command line:

2024-03-03 19:05:45: Initialising Email OAuth 2.0 Proxy (version 2024-01-20) from config file 2024-03-03 19:05:45: Starting IMAP server at 127.0.0.1:1993 (unsecured) proxying outlook.office365.com:993 (SSL/TLS) 2024-03-03 19:05:45: Starting POP server at 127.0.0.1:1995 (unsecured) proxying outlook.office365.com:995 (SSL/TLS) 2024-03-03 19:05:45: Starting SMTP server at 127.0.0.1:1587 (unsecured) proxying smtp.office365.com:587 (STARTTLS) 2024-03-03 19:05:45: Starting IMAP server at 127.0.0.1:2993 (unsecured) proxying imap.gmail.com:993 (SSL/TLS) 2024-03-03 19:05:45: Starting POP server at 127.0.0.1:2995 (unsecured) proxying pop.gmail.com:995 (SSL/TLS) 2024-03-03 19:05:45: Starting SMTP server at 127.0.0.1:2465 (unsecured) proxying smtp.gmail.com:465 (SSL/TLS) 2024-03-03 19:05:45: Initialised Email OAuth 2.0 Proxy - listening for authentication requests. Connect your email client to begin 2024-03-03 19:05:54: Accepting new connection from [::ffff:127.0.0.1]:60918 to IMAP server at 127.0.0.1:1993 (unsecured) proxying outlook.office365.com:993 (SSL/TLS) 2024-03-03 19:07:11: IMAP (127.0.0.1:1993) Caught network error (server) - is there a network connection? Error type <class 'TimeoutError'> with message: [Errno 60] Operation timed out

The only change to config is the client id and client secret

anbanpillay commented 5 months ago

Apologies - it is fixed now - so I closed it. But if anyone wants this info: SSLType should be set to None, AuthMechs to LOGIN and it works.