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.
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