- Remove From My Forums
-
Question
-
I have a newly installed Exchange 2010 SP1 rollup 6.
Inbound mail works.
Outbound mail works.
Outlook anywhere works.
Outlook Web Access works.
Now, I’m trying to add an account as POP3 within another Outlook profile using POP3 to read e-mail from the new system. For this, the setup cannot connect to the POP3 server (the services starts automatically and is running.)
I can telnet to port 110 and the server responds.
the error looks like the title: -ERR command is not valid in this state.
Jim Kay
Answers
-
I have a newly installed Exchange 2010 SP1 rollup 6.
Inbound mail works.
Outbound mail works.
Outlook anywhere works.
Outlook Web Access works.
Now, I’m trying to add an account as POP3 within another Outlook profile using POP3 to read e-mail from the new system. For this, the setup cannot connect to the POP3 server (the services starts automatically and is running.)
I can telnet to port 110 and the server responds.
the error looks like the title: -ERR command is not valid in this state.
Jim Kay
Just for laughs, I changed the advanced settings to indicate the server requires an SSL certificate and BINGO! POP3 connects just fine. (Why? I’m not sure just yet.)
Jim Kay
-
Proposed as answer by
Friday, June 1, 2012 2:46 AM
-
Marked as answer by
Gavin-Zhang
Sunday, July 8, 2012 1:46 PM
-
Proposed as answer by
-
Hi Jim.
For exchange 2010, by default, the server would need the client use ssl for pop3.
regards!
Gavin
TechNet Community Support

-
Marked as answer by
Gavin-Zhang
Sunday, July 8, 2012 1:47 PM
-
Marked as answer by
2021-03-31T09:01:59.718Z,0000000000000001,0,10.1.1.8:110,10.1.1.10:64829,,59,0,51,OpenSession,,,
2021-03-31T09:01:59.806Z,0000000000000001,1,10.1.1.8:110,10.1.1.10:64829,,34,4,25,capa,,R=OK,
2021-03-31T09:01:59.812Z,0000000000000001,2,10.1.1.8:110,10.1.1.10:64829,,4,24,42,user,ErmTv@contoso.ru,"R=""-ERR Command is not valid in this state.""",
2021-03-31T09:01:59.827Z,0000000000000001,3,10.1.1.8:110,10.1.1.10:64829,,11,4,61,quit,,R=OK,
2021-03-31T09:02:04.895Z,0000000000000002,0,10.1.1.8:110,10.1.1.10:64829,,1,0,51,OpenSession,,,
2021-03-31T09:02:04.895Z,0000000000000002,1,10.1.1.8:110,10.1.1.10:64829,,1,4,25,capa,,R=OK,
2021-03-31T09:02:04.896Z,0000000000000002,2,10.1.1.8:110,10.1.1.10:64829,,1,24,42,user,ErmTv@contoso.ru,"R=""-ERR Command is not valid in this state.""",
2021-03-31T09:02:04.896Z,0000000000000002,3,10.1.1.8:110,10.1.1.10:64829,,1,4,61,quit,,R=OK,
2021-03-31T09:02:18.920Z,0000000000000003,0,10.1.1.8:110,10.1.1.10:64829,,1,0,51,OpenSession,,,
2021-03-31T09:02:18.920Z,0000000000000003,1,10.1.1.8:110,10.1.1.10:64829,,1,4,25,capa,,R=OK,
2021-03-31T09:02:18.921Z,0000000000000003,2,10.1.1.8:110,10.1.1.10:64829,,1,24,42,user,ErmTv@contoso.ru,"R=""-ERR Command is not valid in this state.""",
2021-03-31T09:02:18.921Z,0000000000000003,3,10.1.1.8:110,10.1.1.10:64829,,1,4,61,quit,,R=OK,
I’m trying to recive Mails from my server via pop3 by using Javax Mail. I got this error
javax.mail.AuthenticationFailedException: Command is not valid in this state.
I’ve tried to change properties but it doesn’t change the result. I’ve checked with another mail client that the server is reachable and password and username is correct so I don’t understand why it throws this exception. I tried this:
Properties properties = System.getProperties();
properties.put("mail.pop3.ssl.enable", "false");
properties.put("mail.pop3.starttls.enable", "true");
properties.put("mail.pop3.ssl.checkserveridentity", "true");
properties.put("mail.pop3.starttls.required", "true");
Session session = Session.getInstance(properties, null);
Store store = session.getStore("pop3");
store.connect(host, port, username, password);
The javax.mail log says:
DEBUG: setDebug: JavaMail version 1.4ea
DEBUG: getProvider() returning javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc]
DEBUG POP3: connecting to host "XXX.XXX.XXX.XXX", port 110, isSSL false
S: +OK The Microsoft Exchange POP3 service is ready.
C: USER XXX
S: -ERR Command is not valid in this state.
C: QUIT
S: +OK Microsoft Exchange Server 2010 POP3 server signing off.
Does anyone knows this error or has an idea what to do?
Thanks