1
votes
Connected to imap://mail.xxxxx.com:143/?starttls=when-available
S: * OK The Microsoft Exchange IMAP4 service is ready.
C: A00000000 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 LOGINDISABLED STARTTLS UIDPLUS CHILDREN 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 UIDPLUS CHILDREN IDLE NAMESPACE LITERAL+
S: A00000002 OK CAPABILITY completed.
C: A00000003 AUTHENTICATE NTLM
S: +
C: TlRMTVNTUAABAAAABwIIAAAAAAAgAAAAAAAAACAAAAA=
S: + TlRMTVNTUAACAAAACAAIADgAAAAFAokCQ1Oy6n0KV+wAAAAAAAAAAJAAkABAAAAABgGxHQAAAA9DAE8AUgBQAAIACABDAE8AUgBQAAEABABBAEQABAAeAGMAbwByAHAALgB3AG8AcwBpAGcAbgAuAGMAbwBtAAMAJABhAGQALgBjAG8AcgBwAC4AdwBvAHMAaQBnAG4ALgBjAG8AbQAFAB4AYwBvAHIAcAAuAHcAbwBzAGkAZwBuAC4AYwBvAG0ABwAIAEgKvfK4E9IBAAAAAA==
C: TlRMTVNTUAADAAAAGAAYAGgAAAAYABgAgAAAAAAAAABIAAAAIAAgAEgAAAAAAAAAaAAAAAAAAACYAAAAAYIIAgoAWikAAAAPYwBtAHMAMQA1AEAAdwBvAHMAaQBnAG4ALgBjAG8AbQBIi1QHDf/aHwAAAAAAAAAAAAAAAAAAAAClb/du5aSYbtWcPg24wC4ZDwe68ixMp2g=
S: A00000003 NO AUTHENTICATE failed.
C: A00000004 AUTHENTICATE PLAIN
S: +
C: XXXXXXXXXXXXX
S: A00000004 NO AUTHENTICATE failed.
C: A00000005 LOGIN xxxx xxxx
S: A00000005 NO LOGIN failed.
1
If you are up for it, could you verify that this is fixed by building MailKit from GitHub sources and testing the resulting dll in your app? I'd like to make a nuget release this weekend to solve this problem if I can, but I don't want to say "NTLM is fixed!" and then have it turn out that it's not... - jstedfast

1 Answers

0
votes

NTLM authentication does not work in the current release of MailKit 1.6.0 (well, it works with some servers, but apparently not others).

According to https://github.com/jstedfast/MailKit/issues/397, a patch that I recently committed will theoretically fix this issue but I have had no word back from the person who submitted the bug to confirm that it works.

You can either compile from source downloaded from GitHub or wait for the next release.

In the meantime, you could just disable NTLM authentication like so:

client.AuthenticationMechanisms.Remove ("NTLM");

Make this call just before calling Authenticate().