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

Does POP3 NTLM authentication mechanisms works correctly? #391

Closed
SuhovDE opened this issue Aug 24, 2016 · 5 comments
Closed

Does POP3 NTLM authentication mechanisms works correctly? #391

SuhovDE opened this issue Aug 24, 2016 · 5 comments
Labels
compatibility Compatibility with existing software

Comments

@SuhovDE
Copy link

SuhovDE commented Aug 24, 2016

Hello,

I tried to get email using Pop3Client, but received the following exception:

MailKit.Net.Pop3.Pop3CommandException POP3 server did not respond with a +OK response to the STAT command.

POP3 log contains the following lines:

Connected to pop://xxx.xxx.xxx.xxx:110/
S: +OK Microsoft Exchange Server 2003 POP3 server version 6.5.7638.1 (domain.net) ready.
C: CAPA
S: +OK Capability list follows
S: TOP
S: USER
S: PIPELINING
S: EXPIRE NEVER
S: UIDL
S: SASL NTLM
S: .
C: AUTH NTLM
S: +OK
C: CAPA
S: -ERR Logon failure: unknown user name or bad password.
C: STAT
S: -ERR Command is not valid in this state.
C: QUIT
S: +OK Microsoft Exchange Server 2003 POP3 server version 6.5.7638.1 signing off.

Is it correct that client send CAPA as answer for +OK? I thought, that it should send Base 64 encoded Type 1 message instead. See NTLM POP3 Authentication

FYI: After I cleared AuthenticationMechanisms property, the client was authenticated correctly, but using USER Mechanisms.

@SuhovDE SuhovDE changed the title Does NTLM authentication mechanisms works correctly? Does POP3 NTLM authentication mechanisms works correctly? Aug 24, 2016
@jstedfast
Copy link
Owner

Okay, so the problem is that the POP3 server should not be sending +OK (which means "command finished successfully"), it should be sending just + (which means "go ahead and continue").

jstedfast added a commit that referenced this issue Aug 24, 2016
@jstedfast jstedfast added the compatibility Compatibility with existing software label Aug 24, 2016
@jstedfast
Copy link
Owner

I've committed a patch that attempts to work around this broken server behavior. Can you give it a try and report back as to whether or not it fixes the issue?

@SuhovDE
Copy link
Author

SuhovDE commented Aug 25, 2016

With this patch it works correctly.

Thank you for fix.

@jstedfast
Copy link
Owner

You're welcome!

@jstedfast
Copy link
Owner

I've released MailKit 1.6.0 with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with existing software
Projects
None yet
Development

No branches or pull requests

2 participants