0
votes

When I'm using MailKit against an Exchange server, I see following flow from the exchange server log, showing an excessive long time between starttls and capability (about 15s), and some times this same procedure takes about 20ms, which is a huge difference!

The flow looks like:

OpenSession 
capability  
starttls    
capability  
authenticate NTLM
capability
namespace   
list "" "INBOX"
list "" Inbox
select INBOX
uid FETCH 22274 (BODY.PEEK[])
logout  

In MailKit I'm creating a new ImapClient each time, like this:

  1. Create new ImapClient with a NullProtocolLogger() as parameter.
  2. Call .Connect() of this client, wih (username, password, false) parameters.
  3. Call .Authenticate() of this client with new NetworkCredentials.
  4. Getting the inbox folder and receive the mail that I'm looking for.
  5. Call .Disconnect(true) of this client.

I can't see why the Exchange server suddenly once in awhile should stumble on the same sequence between 'starttls' and 'capability'.

Any ideas? Is it a Exchange server issue, or is this a MailKit issue??

1

1 Answers

1
votes

It's an Exchange server issue. Most likely the server is overloaded with requests from other clients or something.