POP handling commands given in wrong state

Mykyta Yevstifeyev <[email protected]> Tue, 26 Jul 2011 07:59:24 +0300
Newsgroups gmane.ietf.pop3ext
Message-ID <[email protected]>
Hello,

Post Office Protocol (POP) currently has no means of explicit indicating 
that the command is given in the wrong state.

>     A server MUST respond to a command issued when the
>     session is in an incorrect state by responding with a negative status
>     indicator.

doesn't give enough information to the client.  The -ERR response 
indicating wrong state may override -ERR response given with its natural 
meaning.  I propose to define the new POP extension response code (RFC 
2449), WRONG-STATE, to indicate this.  Eg.:

> C: <connects to the server>
> S: +OK server ready
> C: STAT
> S: -ERR [WRONG-STATE] Not in TRANSACTION state yet

Any thoughts?

Mykyta Yevstifeyev