Сервер сообщает об ошибке err command is not valid in this state

  • 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

  • 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

In order to fix the problem, issue the following command at the Exchange shell, which allows Exchange POP to use plain text credentials:

Set-PopSettings -LoginType PlainTextLogin

Then restart the POP3 service, that’s it!

Source: http://support.qualityunit.com/knowledgebase/supportcenter/troubleshooting/user-error-command-is-not-valid-in-this-state..html

About SoCRaT

Systems Engineer, OSS & Linux Geek

This entry was posted in Windows and tagged exchange, pop3. Bookmark the permalink.

  • 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
  • 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
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

We ran into an issue today where an older application that we use couldn’t log into our new exchange server when trying to pop mail. (why are we trying to pop when we have Exchange? that’s another story for another day). The Error we kept getting was “ERR Command is not valid in this state”. It’s a pretty simple fix, we just need to enable plain text login for this older application.

  1. Log into your Exchange 2010 CAS server
  2. Open the Exchange Management Shell
  3. Issue command Set-PopSettings -LoginType PlainTextLogin
  4. Restart the Exchange POP Service

That’s it. Give the application another go and you should be able to start POPing mail.

By default Microsoft Exchange 2010 requires you to use TLS Encryption «Secure POP» for authentication to work.  If your organisation does not require Secure POP then by default your users will not be able to login.  They will receive the following error when attempting to access POP3 services through Outlook.

Log onto incoming mail server (POP3): Your e-mail server rejected your user name.  Verify your user name for this account in Account Settings.  The server responded: -ERR Command is not valid in this state.

To allow POP3 to authenticate using standard POP3 you must change teh authentication level as per:

The default setting is «SecureLogon».  Below are the various settings:

This example allows Basic authentication on an unsecured port if you won’t be using TLS encryption.

Set-PopSettings -LoginType PlainTextLogin
This example restricts Basic authentication to use only secured ports if you won’t be using TLS encryption.

Set-PopSettings -LoginType PlainTextAuthentication
This example allows authentication after you use TLS encryption.

Set-PopSettings -LoginType SecureLogin

If you configure use PlainTextLogin users can send their Active Directory password over the internet unencrypted.

If you plan on not using TLS, I always recommend using PlainTextAuthentication which allows users to send the password over the internet without using TLS.  This however does require your users configuring «Require logon using Secure Password Authentication (SPA)» under Outlook.

After you change your Pop settings your users will now be able to authenticate over TCP110.

Important: If you have a user account that is an Administrator in your Exchange environment they will NOT be able to login.  This is due to security, POP3 authentication is not deemed as Secure by Microsoft and as a result Microsoft have prevented Administrative users from authenticating over the internet using POP to avoid administrative credentials leeking.

Important: You must restart the POP3 service for configuration changes to take effect.

Возможно, вам также будет интересно:

  • Сервер сообщает об ошибке err maildrop already locked
  • Сервер слк вернул следующую ошибку
  • Сервер самсунг ошибка 116
  • Сервер самсунг код ошибки 301
  • Сервер перезагружен попробуйте позже код ошибки simulator limit

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии