{"action":"created","issue":{"url":"https://api.github.com/repos/jstedfast/MailKit/issues/532","repository_url":"https://api.github.com/repos/jstedfast/MailKit","labels_url":"https://api.github.com/repos/jstedfast/MailKit/issues/532/labels{/name}","comments_url":"https://api.github.com/repos/jstedfast/MailKit/issues/532/comments","events_url":"https://api.github.com/repos/jstedfast/MailKit/issues/532/events","html_url":"https://github.com/jstedfast/MailKit/issues/532","id":239440788,"number":532,"title":"NTLM AUTH failure causes subsequent PLAIN AUTH attempt","user":{"login":"jimjimbojimbob","id":806400,"avatar_url":"https://avatars0.githubusercontent.com/u/806400?v=3","gravatar_id":"","url":"https://api.github.com/users/jimjimbojimbob","html_url":"https://github.com/jimjimbojimbob","followers_url":"https://api.github.com/users/jimjimbojimbob/followers","following_url":"https://api.github.com/users/jimjimbojimbob/following{/other_user}","gists_url":"https://api.github.com/users/jimjimbojimbob/gists{/gist_id}","starred_url":"https://api.github.com/users/jimjimbojimbob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimjimbojimbob/subscriptions","organizations_url":"https://api.github.com/users/jimjimbojimbob/orgs","repos_url":"https://api.github.com/users/jimjimbojimbob/repos","events_url":"https://api.github.com/users/jimjimbojimbob/events{/privacy}","received_events_url":"https://api.github.com/users/jimjimbojimbob/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-29T10:56:55Z","updated_at":"2017-06-29T12:19:24Z","closed_at":null,"body":"Hi,\r\n\r\nUsing 1.16.1 of Mailkit\r\n\r\nThis is the same issue as #265 but as we are using 1.16.1 I don't think this is fixed?\r\n\r\nWhen connecting to a customers hosted Exchange 2013 server we see authentication errors. Error reported is \r\n\r\n> Server Unavailable. 15\r\n  at MailKit.Net.Imap.ImapClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)\r\n\r\nI know absolutely the username/password are correct, and that the certificates on the server are correct as I have verified this from a Linux server using the 'openssl s_client' and 'mutt' commands.\r\n\r\nProtocol log\r\n\r\n> Connected to imaps://hostedexchange.example.co.uk:993/\r\nS: * OK The Microsoft Exchange IMAP4 service is ready.\r\nC: A00000000 CAPABILITY\r\nS: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=NTLM AUTH=GSSAPI UIDPLUS MOVE ID CHILDREN IDLE NAMESPACE LITERAL+\r\nS: A00000000 OK CAPABILITY completed.\r\nC: A00000001 AUTHENTICATE NTLM\r\nS: +\r\nC: TlRMTVNTUAABAAAABwIAAAAAAAAgAAAAAAAAACAAAAA=\r\nS: + TlRMTVNTUAACAAAAGgAaADgAAAAFAoEC/77SWeKNpNUAAAAAAAAAAO4A7gBSAAAABgOAJQAAAA9DAFUAUwBUAEEAUgBEAC0AQwBMAE8AVQBEAAIAGgBDAFUAUwBUAEEAUgBEAC0AQwBMAE8AVQBEAAEAHgBDAEwATwBVAEQALQBFAFgAQwBIAEEATgBHAEUANAAEACYAQwBVAFMAVABBAFIARAAtAEMATABPAFUARAAuAEMATwAuAFUASwADAEYAQwBMAE8AVQBEAC0ARQBYAEMASABBAE4ARwBFADQALgBDAFUAUwBUAEEAUgBEAC0AQwBMAE8AVQBEAC4AQwBPAC4AVQBLAAUAJgBDAFUAUwBUAEEAUgBEAC0AQwBMAE8AVQBEAC4AQwBPAC4AVQBLAAcACAD1kEI5xfDSAQAAAAA=\r\nC: TlRMTVNTUAADAAAAAAAAAGIAAAAaARoBYgAAAAAAAABIAAAAGgAaAEgAAAAAAAAAYgAAAAAAAAB8AQAAAYIAAgoAWikAAAAPUwBoAGEAcgBvAG4ALgBFAGwAaQBrAGUAcgCB21Flo4mziz0i8YV3BDvvAQEAAAAAAAAbEq+bzfDSAXyIXYeuaXhZAAAAAAIAGgBDAFUAUwBUAEEAUgBEAC0AQwBMAE8AVQBEAAEAHgBDAEwATwBVAEQALQBFAFgAQwBIAEEATgBHAEUANAAEACYAQwBVAFMAVABBAFIARAAtAEMATABPAFUARAAuAEMATwAuAFUASwADAEYAQwBMAE8AVQBEAC0ARQBYAEMASABBAE4ARwBFADQALgBDAFUAUwBUAEEAUgBEAC0AQwBMAE8AVQBEAC4AQwBPAC4AVQBLAAUAJgBDAFUAUwBUAEEAUgBEAC0AQwBMAE8AVQBEAC4AQwBPAC4AVQBLAAcACAD1kEI5xfDSAQAAAAA=\r\nS: A00000001 NO AUTHENTICATE failed.\r\nC: A00000002 AUTHENTICATE PLAIN\r\nS: +\r\nC: [base64 encoded username password string]\r\nS: A00000002 NO AUTHENTICATE failed.\r\nC: A00000003 LOGIN Username Password\r\nS: A00000003 NO Server Unavailable. 15\r\nS: * BYE Connection closed. 14\r\n\r\nHowever as we already know if I exclude NTLM then it works\r\n\r\n> Connected to imaps://hostedexchange.example.co.uk:993/\r\nS: * OK The Microsoft Exchange IMAP4 service is ready.\r\nC: A00000000 CAPABILITY\r\nS: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=NTLM AUTH=GSSAPI UIDPLUS MOVE ID CHILDREN IDLE NAMESPACE LITERAL+\r\nS: A00000000 OK CAPABILITY completed.\r\nC: A00000001 AUTHENTICATE PLAIN\r\nS: +\r\nC: [base64 encoded string here]\r\nS: A00000001 OK AUTHENTICATE completed.\r\n\r\nHopefully have included all the necessary client/server responses as you asked for in #265?\r\n\r\nThank you."},"comment":{"url":"https://api.github.com/repos/jstedfast/MailKit/issues/comments/311949548","html_url":"https://github.com/jstedfast/MailKit/issues/532#issuecomment-311949548","issue_url":"https://api.github.com/repos/jstedfast/MailKit/issues/532","id":311949548,"user":{"login":"jstedfast","id":338984,"avatar_url":"https://avatars1.githubusercontent.com/u/338984?v=3","gravatar_id":"","url":"https://api.github.com/users/jstedfast","html_url":"https://github.com/jstedfast","followers_url":"https://api.github.com/users/jstedfast/followers","following_url":"https://api.github.com/users/jstedfast/following{/other_user}","gists_url":"https://api.github.com/users/jstedfast/gists{/gist_id}","starred_url":"https://api.github.com/users/jstedfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstedfast/subscriptions","organizations_url":"https://api.github.com/users/jstedfast/orgs","repos_url":"https://api.github.com/users/jstedfast/repos","events_url":"https://api.github.com/users/jstedfast/events{/privacy}","received_events_url":"https://api.github.com/users/jstedfast/received_events","type":"User","site_admin":false},"created_at":"2017-06-29T12:19:24Z","updated_at":"2017-06-29T12:19:24Z","body":"I'll probably also need your username and password so that I can actually test that whatever changes I make will result in the correct output.\r\n\r\nIf you have access to create accounts on your server, you could simply create a new (dummy) account and send me those credentials instead (along with a successful NTLM authentication log for said account)."}}
{"actor":{"display_login":"jstedfast"}}