Skip to content

Authentication Failure with Office 365 #62

@MatthewJWalters

Description

@MatthewJWalters

Hello. We're running the proxy on a Linux server with the no-gui parameter. The oauth token and refresh token are being stored in emailproxy.config but when we use fetchmail (or telnet) to connect to the pop3 account we are getting:

2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) --> [ Client connected ]
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     <-- b'+OK The Microsoft Exchange POP3 service is ready. []\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) <-- b'+OK The Microsoft Exchange POP3 service is ready. []\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) --> b'CAPA\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     --> b'CAPA\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     <-- b'+OK\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     <-- b'TOP\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     <-- b'UIDL\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     <-- b'SASL PLAIN XOAUTH2\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     <-- b'USER\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     <-- b'.\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) <-- b'+OK\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) <-- b'TOP\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) <-- b'UIDL\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) <-- b'SASL PLAIN\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) <-- b'USER\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) <-- b'.\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) --> b'USER [redacted]\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) <-- b'+OK\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995) --> b'PASS [[ Credentials removed from proxy log ]]\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     --> b'AUTH XOAUTH2\r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     <-- b'+ \r\n'
2022-09-13 12:00:48: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995)     --> b'[[ Credentials removed from proxy log ]]'
2022-09-13 12:00:49: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995; [redacted])     <-- b'-ERR Authentication failure: unknown user name or bad password.\r\n'
2022-09-13 12:00:49: POP (localhost:1995; 127.0.0.1:52886->outlook.office365.com:995; [redacted]) <-- b'-ERR Authentication failure: unknown user name or bad password.\r\n'

Just wondered if you have any thoughts on what this may be?

Incidentally, is it possible to have a no-gui option with an official 'paste the access code' option? We edited the script to timeout after 5s and prompt for the user to enter the access code. This is because the redirect server address isn't accessible from a browser, probably due to internal firewall rules.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions