IMAP4 Problem with Exchange 2010 SP1 RU5

Posted on 2011-10-03
Last Modified: 2012-05-12
Hello everyone.

I'm having a problem with a program accessing our Exchange 2010 server using IMAP4.

They get the following erros in their log:
30.09.11 17:30:13 ERROR MailImportMessage:122 process() Fehler beim Abholen der Mails: CommandFailedException: A7 NO Command received in Invalid state. (in Protocol:294/in IMAPProtocol:1294/in IMAPProtocol:1279/in IMAPMessage:843/in Message:565/in MailImportMessage:118/in ImportMailConnection:1424/in ImportMailConnection:81/in ImportMailConnection$ActionProcessor:638/in ImportMailConnection:794/in ImportMailConnection:470/in ImportAccount:153/in ImportComWorker:495) / MessagingException@IMAPMessage:847
30.09.11 17:30:28 ERROR ImportMailConnection:711 getData() Error fetching message: FolderClosedException: Lost folder connection to server (in IMAPFolder:328/in IMAPFolder:1250/in ImportMailConnection:709/in ImportMailConnection:470/in ImportAccount:153)
30.09.11 17:30:28 Error: Verbindungsfehler bei Konto 84: ConnectionException: FolderClosedException: Lost folder connection to server (in ImportMailConnection:709) (in ImportMailConnection:712/in ImportMailConnection:470/in ImportAccount:153/in ImportComWorker:495)
30.09.11 17:30:28 Debug(5): Import-Kommunikation beenden

Open in new window

So they asked me to look into the IMAP4 log and all I get there are the following messages:
2011-10-03T12:06:20.070Z,000000000000000B,2,xxx.xx.xx.xx:143,xxx.xx.xx.xy:51947,user,62,32,34,authenticate,PLAIN,"R=ok;RpcC=16;RpcL=15;LdapC=3;LdapL=15;Msg=""User:user:3f7916fb-d3d6-4c71-a9b6-6527992c085e:Mailbox Database"";Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/1%,AB:$null/$null/0%,RPC:$null/$null/1%,FC:$null/0,Policy:ImapThrottlingPolicy,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),]"""
2011-10-03T12:06:20.085Z,000000000000000B,3,xxx.xx.xx.xx:143,xxx.xx.xx.xy:51947,user,15,28,264,examine,"""2 - Folder""","R=ok;RpcC=9;RpcL=16;Rows=99;Recent=99;Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/1%,AB:$null/$null/0%,RPC:$null/$null/1%,FC:$null/0,Policy:ImapThrottlingPolicy,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),]"""
. (List goes on for about 50 lines)
2011-10-03T12:07:02.054Z,000000000000000B,201,xxx.xx.xx.xx:143,xxx.xx.xx.xy:51947,user,0,49,370,fetch,99 (ENVELOPE INTERNALDATE RFC822.SIZE),"R=OK;RpcC=2;Rows=1;Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/2%,AB:$null/$null/0%,RPC:$null/$null/2%,FC:$null/0,Policy:ImapThrottlingPolicy,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),];GC:1/0/0;"""
2011-10-03T12:07:02.351Z,000000000000000B,202,xxx.xx.xx.xx:143,xxx.xx.xx.xy:51947,user,15,21,62,fetch,99 (FLAGS),"R=OK;Rows=1;Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/2%,AB:$null/$null/0%,RPC:$null/$null/2%,FC:$null/0,Policy:ImapThrottlingPolicy,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),];GC:1/0/0;"""
2011-10-03T12:07:02.554Z,000000000000000B,203,xxx.xx.xx.xx:143,xxx.xx.xx.xy:51947,user,0,10,26,close,,"R=ok;Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/2%,AB:$null/$null/0%,RPC:$null/$null/2%,FC:$null/0,Policy:ImapThrottlingPolicy,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),];GC:1/0/0;"""
2011-10-03T12:07:02.554Z,000000000000000B,204,xxx.xx.xx.xx:143,xxx.xx.xx.xy:51947,user,0,11,91,logout,,"R=ok;Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/2%,AB:$null/$null/0%,RPC:$null/$null/2%,FC:$null/0,Policy:ImapThrottlingPolicy,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),];GC:1/0/0;"""

Open in new window

So I'm wondering is this a problem with our exchange server or is it a problem with their software?

As far as I can see their using JavaMail to connect to the server. PlainText Login is enabled because it's internal and only one their user needs IMAP4 access.

Also because I thought the cause was the DefaultThrottlingPolicy I made a new Policy with no throttling enabled just for this user. But the it didn't change anything.

All other users can work without problems.

Would be great if someone has some advice.

Thanks in advance.
Question by:HPatzen
    LVL 11

    Assisted Solution

    Are you able to use a normal IMAP4 client and connect with the same account? If so I would say it's an issue with their software.

    Are the firewall ports for IMAP4 open between the client and the server? Have you enabled IMAP4 enabled for the user?
    LVL 1

    Author Comment

    I tried using Outlook and I get the same Log entries. Even though I can see the E-Mails and it seems to work?! They also said that they get the E-Mails but the Log entries are still generated.

    Firewall ain't the Problem. (Even turned it off for testing but no difference.) IMAP4 is enabled for the user.
    LVL 11

    Assisted Solution

    They get an error in their logs?
    IMAP logs looks like above?
    Outlook seems to be working?
    IMAP logs looks like above?

    Sounds like the error is at their end and not yours.
    LVL 1

    Accepted Solution

    Outlook seems to be working. Well I can see all the mails and read them.

    But I had to modify the user when I was trying to connect from Outlook. (Allowing him to log into the Machine I was using. Apparently the particular user is really restricted and only allowed to bogon to certain computers. After adding the machine I used for testing it worked.

    Now I get the following things logged every time they connect to the server to get mails about 50 entries or so:
    2011-10-07T14:37:00.882Z,000000000000004A,199,xxx.xx.xx.xx:143,xxx.xx.xx.xy:57196,user,0,49,370,fetch,98 (ENVELOPE INTERNALDATE RFC822.SIZE),"R=OK;RpcC=2;Rows=1;Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/3%,AB:$null/$null/0%,RPC:$null/$null/3%,FC:1000/0,Policy:DefaultThrottlingPolicy_bb775c65-f6df-440f-b150-b7e9b6a7c0f2,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),];GC:1/0/0;"""
    2011-10-07T14:37:01.085Z,000000000000004A,200,xxx.xx.xx.xx:143,xxx.xx.xx.xy:57196,user,0,21,54,fetch,98 (FLAGS),"R=OK;Rows=1;Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/3%,AB:$null/$null/0%,RPC:$null/$null/3%,FC:1000/0,Policy:DefaultThrottlingPolicy_bb775c65-f6df-440f-b150-b7e9b6a7c0f2,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),];GC:1/0/0;"""

    Open in new window

    But I guess their just normal log messages and it all seems working now.

    They said that they sometimes still get the "NO Command received in Invalid state" but they receive the messages and their software doesn't generate an error. I've also checked the log for this messages and they sometimes appear.
    2011-10-07T05:06:57.333Z,0000000000000016,212,xxx.xx.xx.xx:143,xxx.xx.xx.xy:50766,user,15,29,44,store,103 +FLAGS (\Seen),"R=""A211 NO Command received in Invalid state."";Budget=""Conn:0,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/1%,AB:$null/$null/0%,RPC:$null/$null/1%,FC:1000/0,Policy:DefaultThrottlingPolicy_bb775c65-f6df-440f-b150-b7e9b6a7c0f2,Norm[Resources:(DC),HistLoad:0),(Mdb)Mailbox Database 0693456929(Health:-1%,HistLoad:0),];GC:1/0/0;"""

    Open in new window

    So all in all the problems seems solved. Or maybe you know why this error sometimes gets generated?

    Anyway have a nice weekend.
    LVL 1

    Author Closing Comment

    It's all working now.


    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
    Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
    In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
    To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now