Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAP Basic Auth incorrectly sends XOAUTH2 #571

Open
akofoed opened this issue Nov 20, 2024 · 1 comment
Open

IMAP Basic Auth incorrectly sends XOAUTH2 #571

akofoed opened this issue Nov 20, 2024 · 1 comment
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Severity: Moderate Minor Impact Type: Bug Something isn't working

Comments

@akofoed
Copy link

akofoed commented Nov 20, 2024

Issue

When configuring inbound email using IMAP port 143 with "Basic Auth", SuiteCRM sends AUTHENTICATE XOAUTH2 instead of A0001 LOGIN username password

This is what SuiteCRM sends to port 143:

user@imapserver:~$ sudo nc -l 143

* OK [CAPABILITY IMAP4 IMAP4rev1 STARTTLS UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] perdition ready on ::ffff:192.168.0.15 00011ef1
A0001 AUTHENTICATE XOAUTH2 dXNPcj1jcm1AYWVybmV3d29ya3MuY29tAWF1dGg9QmVhcmVyIDdvR2I1WWVRajEzVjVnVDYBAQ==

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/group-inbound-emails-not-working-in-7-14-sending-xoauth2-instead-of-basic-auth/91843/15

Possible Fix

No response

Steps to Reproduce the Issue

1.
2.
3.

Context

No response

Version

8.7.1

What browser are you currently using?

Firefox

Browser Version

No response

Environment Information

PHP 8.2

Operating System and Version

Ubuntu 22.04

@akofoed akofoed added the Type: Bug Something isn't working label Nov 20, 2024
@johnM2401 johnM2401 added Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Area: Emails Issues & PRs related to all things regarding emails & email module Severity: Moderate Minor Impact labels Nov 22, 2024
@akofoed
Copy link
Author

akofoed commented Nov 23, 2024

I've found out that the problem is the IMAP server I'm connecting to is not advertising AUTH=PLAIN when PHP imap_open() is sending the CAPABILITY command:

me@laptop:~$ telnet imap.server.com 143
Trying 1111:111:fff1:11::1...
Connected to imap.server.com.
Escape character is '^]'.
* OK [CAPABILITY IMAP4 IMAP4rev1 STARTTLS UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] perdition ready on fd00:dead:beef:1234::15 00011e1d
A0001 CAPABILITY
* CAPABILITY IMAP4 IMAP4rev1 STARTTLS UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION
A0001 OK CAPABILITY

When simulating the connection from SuiteCRM (PHP8.2) using 'nc -l 143' and modifying the above CAPABILITY response inserting AUTH=PLAIN, then SuiteCRM (php imap_open) correctly sends the LOGIN command.

So it is aparently not a SuiteCRM problem. My apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module Priority:Important Issues & PRs that are important; broken functions; errors; there are workarounds Severity: Moderate Minor Impact Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants