Open filipe3x opened 6 hours ago
Log of email-oauth2-proxy
in debug mode:
2024-09-30 12:47:10: Accepting new connection from 127.0.0.1:45576 to IMAP server at 127.0.0.1:1993 (unsecured) proxying outlook.office365.com:993 (SSL/TLS)
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> [ Client connected ]
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-> [ Starting TLS handshake ]
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-> [ TLSv1.2 handshake complete ]
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'* OK The Microsoft Exchange IMAP4 service is ready. [QgBZADUAUABSADEANgBDAEEAMAAwADMAMA...]\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'* OK The Microsoft Exchange IMAP4 service is ready. [QgBZADUAUABSADEANgBDAEEAMAAwADMAMA...]\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> b'FEBF1 CAPABILITY\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> b'FEBF1 CAPABILITY\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'* CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN SASL-IR UIDPLUS ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'FEBF1 OK CAPABILITY completed.\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'FEBF1 OK CAPABILITY completed.\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> b'FEBF2 ID ("name" "OfflineIMAP" "version" "8.0.0")\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> b'FEBF2 ID ("name" "OfflineIMAP" "version" "8.0.0")\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'* ID ("name" "Microsoft.Exchange.Imap4.Imap4Server" "version" "15.20")\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'* ID ("name" "Microsoft.Exchange.Imap4.Imap4Server" "version" "15.20")\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'FEBF2 OK ID completed\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'FEBF2 OK ID completed\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> b'FEBF3 AUTHENTICATE PLAIN\r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- b'+ \r\n'
2024-09-30 12:47:10: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> b'[[ Credentials removed from proxy log ]]'
2024-09-30 12:47:11: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> b'FEBF3 AUTHENTICATE XOAUTH2 '
2024-09-30 12:47:11: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) --> b'[[ Credentials removed from proxy log ]]\r\n'
2024-09-30 12:47:15: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993; filipe.it@outlook.pt) <-- b'FEBF3 NO AUTHENTICATE failed.\r\n'
2024-09-30 12:47:15: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993; filipe.it@outlook.pt) <-- b'FEBF3 NO AUTHENTICATE failed.\r\n'
2024-09-30 12:47:15: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993) <-- [ Server disconnected ]
2024-09-30 12:47:15: IMAP (127.0.0.1:45576-{127.0.0.1:1993}-outlook.office365.com:993; filipe.it@outlook.pt) --> [ Client disconnected ]
And this is Proxy's configuration file
[IMAP-1993]
server_address = outlook.office365.com
server_port = 993
local_address = 127.0.0.1
[filipe.it@outlook.pt]
permission_url = https://login.microsoftonline.com/915bb16f-a535-4e08-9143-8af506774452/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/915bb16f-a535-4e08-9143-8af506774452/oauth2/v2.0/token
oauth2_scope = https://graph.microsoft.com/IMAP.AccessAsUser.All offline_access openid profile
redirect_uri = https://localhost:7598
client_id = 15ab30a8-5079-47c7-ae31-ba577e27e1db
client_secret = QeE...
Please also post the proxy configuration file you are using.
Added the important bits of the proxy configuration file above.
Hello, I am trying to set up offlineimap3 to work with the oauth2 proxy, but I get this error.
In email-oauth2-proxy everything seems ok:
2024-09-30 12:18:59: Accepting new connection from 127.0.0.1:45572 to IMAP server at 127.0.0.1:1993 (unsecured) proxying outlook.office365.com:993 (SSL/TLS)
offlineimap configuration:
Should I change
auth_mechanisms
to 'OAUTH2' instead of 'PLAIN'? Thanks in advance.