Plain text POP3/IMAP4 authentication to Exchange 2007 fail with the following error message:
ERR Command is not valid in this state.
BAD Command received in Invalid state.
POP3/IMAP4 services in Exchange 2007 require TLS by default, plain text authentication is not allowed.
By default, Exchange 2007 requires to use encrypted connection on SSL ports (995 and 993 for POP3s and IMAPs correspondingly) or TLS-enabled connection on standard ports (110 and 143 for POP3 and IMAP4 correspondingly).
However, if plain text authentication is required, it may be enabled on every CAS server (Client Access Server) using the following PowerShell cmdlets:
PS> Set-PopSettings -LoginType PlainTextLogin
PS> Set-ImapSettings -LoginType PlainTextLogin
PS> Restart-Service -service msexchangepop3
PS> Restart-Service -service msexchangeimap4