Bug 4831 - OAUTH with Pop3 to Outlook ERR Protocol error. 16
Summary: OAUTH with Pop3 to Outlook ERR Protocol error. 16
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: OAuth2 (show other bugs)
Version: 4.1.1
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2024-10-09 22:54 UTC by Johnny Johnson
Modified: 2025-02-05 21:26 UTC (History)
0 users

See Also:


Attachments

Description Johnny Johnson 2024-10-09 22:54:22 UTC
I have OAuth2 setup correctly, but when I try to use POP3 then it gives the error. Below is the log. If I setup an account with IMAP it works, but I don't want to use IMAP, I want to use POP3.


* OAuth2 access token still fresh
* Account 'Hotmail': Connecting to POP3 server: outlook.office365.com:995...
[2024-10-09 19:36:32] POP< +OK The Microsoft Exchange POP3 service is ready. [QwBIADAAUABSADAAMwBDAEEAMAAyADcAMgAuAG4AYQBtAHAAcgBkADAAMwAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A]
[2024-10-09 19:36:32] POP> AUTH XOAUTH2  ********
[2024-10-09 19:36:32] POP< -ERR Protocol error. 16
*** error occurred on POP session
*** Error occurred while processing mail.
Comment 1 David Fletcher 2025-02-05 21:12:43 UTC
This is fixed in git since 2022-11-08, so definitely in recent releases. A tweak was added to handle POP for Microsoft using Oauth2 authentication.

Here's an example of it working using the '2 stage' connection that Microsoft uses. 

[2025-02-05 22:07:49] POP< +OK The Microsoft Exchange POP3 service is ready. [TABPADQAUAAxADIAMwBDAEEAMAA2ADgAMAAuAEcAQgBSAFAAMQAyADMALgBQAFIATwBEAC4AuAEMATwBNAA==]
[2025-02-05 22:07:49] POP> AUTH XOAUTH2  ********
[2025-02-05 22:07:49] POP< + 
[2025-02-05 22:07:49] POP> dXNlcj1kYXZpZG1lZ2FwaWNvQG91dGxvb2suY29tAWF1dGg9QmVhcmVyIEV3QllBK2wzQkFBVWNliM3J1WmhK... (truncated from 1588)
[2025-02-05 22:07:54] POP< +OK User successfully authenticated.
[2025-02-05 22:07:54] POP> STAT
[2025-02-05 22:07:54] POP< +OK 16 1671680

Note You need to log in before you can comment on or make changes to this bug.