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

Syntax error in response. Unexpected token: [atom: A00000003] #333

Closed
test-in-prod opened this issue Apr 29, 2016 · 1 comment
Closed

Syntax error in response. Unexpected token: [atom: A00000003] #333

test-in-prod opened this issue Apr 29, 2016 · 1 comment
Labels
question A question about how to do something

Comments

@test-in-prod
Copy link

Hello,

Trying to connect and authenticate with an Exchange 2010 SP3 server but getting this bizarre exception:

MailKit.Net.Imap.ImapProtocolException: Syntax error in response. Unexpected token: [atom: A00000003]
   at MailKit.Net.Imap.ImapCommand.Step()
   at MailKit.Net.Imap.ImapEngine.Iterate()
   at MailKit.Net.Imap.ImapEngine.Wait(ImapCommand ic)
   at MailKit.Net.Imap.ImapClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
   at MailKit.MailService.Authenticate(String userName, String password, CancellationToken cancellationToken)
...

FYI, removed NTLM as authentication mechanism to no effect. SSL is also disabled.

IMAP Log:

Connected to imap://example.org:143/?starttls=when-available
S: * OK The Microsoft Exchange IMAP4 service is ready. SERVERNAMEHERE
C: A00000000 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS IDLE NAMESPACE LITERAL+
S: A00000000 OK CAPABILITY completed.
C: A00000001 STARTTLS
S: A00000001 OK Begin TLS negotiation now.
C: A00000002 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN IDLE NAMESPACE LITERAL+
S: A00000002 OK CAPABILITY completed.
C: A00000003 AUTHENTICATE PLAIN
S: +
C: <some base64 string here>
S: A00000003 NO Server Unavailable. 15
C: A00000004 LOGIN <username@domain> <userpassword>
S: A00000003 NO AUTHENTICATE failed.

Thanks!

@jstedfast jstedfast added the question A question about how to do something label Apr 30, 2016
@jstedfast
Copy link
Owner

This is the problem:

C: A00000004 LOGIN <username@domain> <userpassword>
S: A00000003 NO AUTHENTICATE failed.

The server should have responded with an A00000004 tag, not A00000003 (like it did).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question A question about how to do something
Projects
None yet
Development

No branches or pull requests

2 participants