RFC 1225 (rfc1225) - Page 3 of 16
Post Office Protocol: Version 3
Alternative Format: Original Text Document
RFC 1225 POP3 May 1991
Hence a multi-line response is terminated with the five octets
"CRLF.CRLF". When examining a multi-line response, the client checks
to see if the line begins with the termination octet. If so and if
octets other than CRLF follow, the the first octet of the line (the
termination octet) is stripped away. If so and if CRLF immediately
follows the termination character, then the response from the POP
server is ended and the line containing ".CRLF" is not considered
part of the multi-line response.
A POP3 session progresses through a number of states during its
lifetime. Once the TCP connection has been opened and the POP3
server has sent the greeting, the session enters the AUTHORIZATION
state. In this state, the client must identify itself to the POP3
server. Once the client has successfully done this, the server
acquires resources associated with the client's maildrop, and the
session enters the TRANSACTION state. In this state, the client
requests actions on the part of the POP3 server. When the client has
finished its transactions, the session enters the UPDATE state. In
this state, the POP3 server releases any resources acquired during
the TRANSACTION state and says goodbye. The TCP connection is then
closed.
The AUTHORIZATION State
Once the TCP connection has been opened by a POP3 client, the POP3
server issues a one line greeting. This can be any string terminated
by CRLF. An example might be:
S. +OK dewey POP3 server ready (Comments to: )
Note that this greeting is a POP3 reply. The POP3 server should
always give a positive response as the greeting.
The POP3 session is now in the AUTHORIZATION state. The client must
now issue the USER command. If the POP3 server responds with a
positive success indicator ("+OK"), then the client may issue either
the PASS command to complete the authorization, or the QUIT command
to terminate the POP3 session. If the POP3 server responds with a
negative success indicator ("-ERR") to the USER command, then the
client may either issue a new USER command or may issue the QUIT
command.
When the client issues the PASS command, the POP3 server uses the
argument pair from the USER and PASS commands to determine if the
client should be given access to the appropriate maildrop. If so,
the POP3 server then acquires an exclusive-access lock on the
maildrop. If the lock is successfully acquired, the POP3 server
parses the maildrop into individual messages (read note below),
Rose