Cannot connect to imap (exchange 2008 server)

Hi!

I am trying to access my mail account SMTP works fine, but IMAP always return “server not responding”.

Other mail clients work fine, only eM fails :frowning:

Anyone could help?

The log for IMAP:

12:56:09.920|001| eM Client 10.1.4588+f11e2ab373 (Windows)
12:56:09.924|018| Account’s UID is 38ac19d1-5fa2-4013-bf88-32df53584e8b
12:56:09.924|018| AccountBase.ChangeOnlineState : State changed to ONLINE due User
12:56:09.925|018| WARNING no INBOX folder found to watch!
12:56:09.925|018| >>> ListFoldersAsync(): Start
12:56:09.925|018| >>> Starting account synchronization
12:56:09.934|018| 01: Connecting to mail.lanit-tercom.com:993 with TLS …
12:56:10.234|018| 01: TLS stream established with Protocol: Tls12, NegotiatedCipherSuite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, CipherAlgorithm: Aes256, HashAlgorithm: Sha384
12:56:10.238|018| 01: * OK IMAP4 service is ready.
12:56:10.242|018| 01: A1 CAPABILITY
12:56:10.313|018| 01: * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS IDLE NAMESPACE LITERAL+
12:56:10.314|018| 01: A1 OK CAPABILITY completed.
12:56:10.314|018| 01: A2 AUTHENTICATE GSSAPI
12:56:10.385|018| 01: +
12:56:10.462|018| 01:
12:56:10.534|018| 01: +
12:56:10.534|018| 01:
12:56:10.617|018| 01: +
12:56:10.618|018| >>> ConnectionPoolEntry.CloseAsync(): Failed to connect: System.InvalidOperationException: This operation is only allowed using a successfully authenticated context.
12:56:10.618|018| at System.Net.Security.NegotiateAuthentication.GetOutgoingBlob(ReadOnlySpan1 incomingBlob, NegotiateAuthenticationStatusCode& statusCode) 12:56:10.618|018| at MailClient.Authentication.Mechanisms.NegotiateMechanism.Client.EvaluateChallenge(Byte[] challenge) 12:56:10.618|018| at MailClient.Imap.Base.Connection.AuthenticateAsync(SaslMechanism scheme, ClientCredential credential, Boolean useInitialResponse, CancellationToken cancellationToken) 12:56:10.618|018| at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken) 12:56:10.618|018| 01: A3 LOGOUT 12:56:10.696|018| 01: A2 NO AUTHENTICATE failed. 12:56:10.922|018| 01: --- CMD LOGOUT WAS CANCELLED 12:56:10.922|018| 01: --- RECEIVE CANCELLED 12:56:10.923|018| 01: Connection 1 was closed, deliberate = True 12:56:10.923|018| >>> COMMAND CONNECTION EXCEPTION (retry: True): MailClient.Accounts.ConnectionException: This operation is only allowed using a successfully authenticated context. 12:56:10.923|018| ---> System.InvalidOperationException: This operation is only allowed using a successfully authenticated context. 12:56:10.923|018| at System.Net.Security.NegotiateAuthentication.GetOutgoingBlob(ReadOnlySpan1 incomingBlob, NegotiateAuthenticationStatusCode& statusCode)
12:56:10.923|018| at MailClient.Authentication.Mechanisms.NegotiateMechanism.Client.EvaluateChallenge(Byte challenge)
12:56:10.923|018| at MailClient.Imap.Base.Connection.AuthenticateAsync(SaslMechanism scheme, ClientCredential credential, Boolean useInitialResponse, CancellationToken cancellationToken)
12:56:10.923|018| at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
12:56:10.923|018| — End of inner exception stack trace —
12:56:10.923|018| at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
12:56:10.923|018| at MailClient.Protocols.Imap.ConnectionPool.AcquireConnectionAsync(Folder mailFolder, Boolean noSelect)
12:56:10.923|018| at MailClient.Protocols.Imap.ConnectionContext.CreateContextAsync(ImapAccount account)
12:56:10.923|018| at MailClient.Protocols.Imap.ImapFolderSynchronizer.ListFoldersAsync(IListFoldersProgress progress, Folder homeFolder, CancellationToken cancellationToken)
12:56:10.923|018| at MailClient.Protocols.Imap.ImapFolderSynchronizer.GetFolderList(IListFoldersProgress progress, Folder homeFolder, CancellationToken cancellationToken)
12:56:10.923|018| at MailClient.Protocols.Common.FolderSynchronizer.<>c__DisplayClass18_0.b__0(WorkerStatus status, CancellationToken cancellationToken)
12:56:10.923|018| at MailClient.Protocols.Imap.ImapActionCommand.<>c__DisplayClass11_0.<.ctor>b__0(WorkerStatus ws, CancellationToken ct)
12:56:10.923|018| at MailClient.Protocols.Imap.ImapActionCommand.ExecuteInternalSync(WorkerStatus status)
12:56:10.923|018| at MailClient.Protocols.Imap.ImapActionCommand.Execute(WorkerStatus status)
12:56:10.923|018| >>> ListFoldersAsync(): Start
12:56:10.923|018| 02: Connecting to mail.lanit-tercom.com:993 with TLS …
12:56:11.069|018| 02: TLS stream established with Protocol: Tls12, NegotiatedCipherSuite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, CipherAlgorithm: Aes256, HashAlgorithm: Sha384
12:56:11.138|018| 02: * OK IMAP4 service is ready.
12:56:11.138|018| 02: A1 CAPABILITY
12:56:11.207|018| 02: * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS IDLE NAMESPACE LITERAL+
12:56:11.207|018| 02: A1 OK CAPABILITY completed.
12:56:11.208|018| 02: A2 AUTHENTICATE GSSAPI
12:56:11.278|018| 02: +
12:56:11.279|018| 02:
12:56:11.349|018| 02: +
12:56:11.349|018| 02:
12:56:11.425|018| 02: +
12:56:11.425|018| >>> ConnectionPoolEntry.CloseAsync(): Failed to connect: System.InvalidOperationException: This operation is only allowed using a successfully authenticated context.
12:56:11.425|018| at System.Net.Security.NegotiateAuthentication.GetOutgoingBlob(ReadOnlySpan1 incomingBlob, NegotiateAuthenticationStatusCode& statusCode) 12:56:11.426|018| at MailClient.Authentication.Mechanisms.NegotiateMechanism.Client.EvaluateChallenge(Byte[] challenge) 12:56:11.426|018| at MailClient.Imap.Base.Connection.AuthenticateAsync(SaslMechanism scheme, ClientCredential credential, Boolean useInitialResponse, CancellationToken cancellationToken) 12:56:11.426|018| at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken) 12:56:11.426|018| 02: A3 LOGOUT 12:56:11.498|018| 02: A2 NO AUTHENTICATE failed. 12:56:11.731|018| 02: --- CMD LOGOUT WAS CANCELLED 12:56:11.732|018| 02: --- RECEIVE CANCELLED 12:56:11.732|018| 02: Connection 2 was closed, deliberate = True 12:56:11.732|018| >>> COMMAND CONNECTION EXCEPTION: MailClient.Accounts.ConnectionException: This operation is only allowed using a successfully authenticated context. 12:56:11.732|018| ---> System.InvalidOperationException: This operation is only allowed using a successfully authenticated context. 12:56:11.732|018| at System.Net.Security.NegotiateAuthentication.GetOutgoingBlob(ReadOnlySpan1 incomingBlob, NegotiateAuthenticationStatusCode& statusCode)
12:56:11.732|018| at MailClient.Authentication.Mechanisms.NegotiateMechanism.Client.EvaluateChallenge(Byte challenge)
12:56:11.732|018| at MailClient.Imap.Base.Connection.AuthenticateAsync(SaslMechanism scheme, ClientCredential credential, Boolean useInitialResponse, CancellationToken cancellationToken)
12:56:11.732|018| at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
12:56:11.732|018| — End of inner exception stack trace —
12:56:11.732|018| at MailClient.Protocols.Imap.ConnectionPoolEntry.ConnectInternalAsync(CancellationToken cancellationToken)
12:56:11.733|018| at MailClient.Protocols.Imap.ConnectionPool.AcquireConnectionAsync(Folder mailFolder, Boolean noSelect)
12:56:11.733|018| at MailClient.Protocols.Imap.ConnectionContext.CreateContextAsync(ImapAccount account)
12:56:11.733|018| at MailClient.Protocols.Imap.ImapFolderSynchronizer.ListFoldersAsync(IListFoldersProgress progress, Folder homeFolder, CancellationToken cancellationToken)
12:56:11.733|018| at MailClient.Protocols.Imap.ImapFolderSynchronizer.GetFolderList(IListFoldersProgress progress, Folder homeFolder, CancellationToken cancellationToken)
12:56:11.733|018| at MailClient.Protocols.Common.FolderSynchronizer.<>c__DisplayClass18_0.b__0(WorkerStatus status, CancellationToken cancellationToken)
12:56:11.733|018| at MailClient.Protocols.Imap.ImapActionCommand.<>c__DisplayClass11_0.<.ctor>b__0(WorkerStatus ws, CancellationToken ct)
12:56:11.733|018| at MailClient.Protocols.Imap.ImapActionCommand.ExecuteInternalSync(WorkerStatus status)
12:56:11.733|018| at MailClient.Protocols.Imap.ImapActionCommand.Execute(WorkerStatus status)
12:56:11.733|018| AccountBase.GoOfflineAsync : State changed to OFFLINE due BrokenConnection
12:56:11.733|018| AccountBase.ChangeOnlineState : State changed to OFFLINE due BrokenConnection
12:56:11.733|018| >>> Account synchronization finished
12:56:11.733|018| AccountBase.GoOfflineAsync : State changed to OFFLINE due BrokenConnection

What version of eM Client are you using ?, and what version of Windows do you have ?.

Also what is your Incoming mail server settings, Server address, Port and Security policy ?.

Also what mail server are you with ?.

IMAP4rev1 AUTH=NTLM AUTH=GSSAPI

I see too there is the word GSSAPI mentioned in your Log, which “some older mail servers” eg: don’t support the latest eM Client V10 IMAP authentication method (if you are using eM Client V10) and “need a Plain Text String login added to the diagnostic tab of the Account” eg: --force-imap-auth LOGIN or --force-imap-auth PLAIN as in the following thread posts

So your mail server might need an IMAP plain text string and / or SMTP plain text string to work apart from the correct mail server settings.

Yes, the mail server is old Exchange 2008 and client is of the latest version on Win 11.

I’ve just resolved the problem in a strange way.

If you select “Exchange” as a server type, the client then tries to autp-resolve the server parameters and if it fails to contact the server, then it allows you to manually set the server name and then it configures everything in the correct way.

But in my case it managed to contact some office365 server and prompted me to login via MS first, that fails. So the solution was to disable internet connection at the stage of autodetection, then enabling it back when autodetection fails.

It would be great to have a possibility to manually enter the server name without first trying to autodetect.

I’ve just resolved the problem in a strange way.

If you select “Exchange” as a server type, the client then tries to auto-resolve the server parameters and if it fails to contact the server, then it allows you to manually set the server name and then it configures everything in the correct way.

Ah ok normally eM Client will auto connect with the wizard no issues to later Exchange mail servers without doing that work around.

Maybe suggest “if you can to look at upgrading to a later Exchange Mail server” which also then would be supported by eM Client official support incase you have problems again in future.

There is also no more Security updates now with Exchange 2008 as it’s no longer supported by Microsoft since 2020 even with extended support. So be another reason to look at upgrading.