+1 vote

I have had this solution worked for a while but now it´s not getting my email.

I´ll attach the email log if you could see something

S: * OK The Microsoft Exchange IMAP4 service is ready.
    [RABCADQAUABSADAANABDAEEAMAAwADIANgAuA
    GUAdQByAHAAcgBkADAANAAuAHAAcgBvAGQALgB
    vAHUAdABsAG8AbwBrAC4AYwBvAG0A]
C: 4301ee56b7f74a05 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN UIDPLUS 
    CHILDREN IDLE NAMESPACE LITERAL+
S: 4301ee56b7f74a05 OK CAPABILITY completed.
C: 63c5f6bcf2c84cc2 AUTHENTICATE PLAIN ABC...DEF=
S: 63c5f6bcf2c84cc2 BAD Command Argument Error. 12
C: 97494663a77d4dc3 AUTHENTICATE PLAIN
S: +
C: ABC...DEF=
S: 97494663a77d4dc3 OK AUTHENTICATE completed.
C: 22f14970c6ca4195 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN UIDPLUS 
    CHILDREN IDLE NAMESPACE LITERAL+
S: 22f14970c6ca4195 OK CAPABILITY completed.
C: 41f6f64e087e4bd3 SELECT "INBOX"
S: 41f6f64e087e4bd3 BAD User is authenticated but not connected.
by
edited by

1 Answer

0 votes
 
Best answer

I have never seen such server error:

S: 41f6f64e087e4bd3 BAD User is authenticated but not connected.

It's very strange. How a client can be not-connected and receive not-connected error at the same time?

Authentication was successful:

S: 97494663a77d4dc3 OK AUTHENTICATE completed.

and even subsequent IMAP command was performed correctly:

C: 22f14970c6ca4195 CAPABILITY
S: * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN UIDPLUS 
    CHILDREN IDLE NAMESPACE LITERAL+
S: 22f14970c6ca4195 OK CAPABILITY completed.

Are you able to log in via web UI?

It seems you should contact server administrator for details.

by (297k points)
edited by
After customer went in to the web UI
And I did a reboot of the server everything is working.
We are having the same problem. Everything worked fine for around 6 months, after that we started getting this error.

One thing might be different from the original case, we don't get this error every time. Our program reads mail every 3 minutes and our logs show that the error occurs 150-400 times a day. There is no visible reason why, at least none that we have been able to come up with.

Any clue to what could be causing this?
Have you contacted your server administrator or support? This issue doesn't seem to be client related.
After some research three reasons are most frequently mentioned:

1. It is a Microsoft's mechanism to shut down chatty clients. The solution would be to login to this account less frequently. (Remember to close the connection properly use Close method and 'using' clause around Imap instance).

2. It is due to a bug in MS IMAP implementation. If the client presents a valid user name but an invalid password, the server accepts the login, but subsequent commands fail with the aforementioned error message.

3. It is a shared mailbox and you are using incorrect login scheme. Use Login method and Username@DomainName\SharedMailbox@DomainName for O365 per: https://www.limilabs.com/blog/shared-mailbox-office365
...