6. The UPDATE State
When the client issues the QUIT command from the TRANSACTION state, the POP3 session enters the UPDATE state. (Note that if the client issues the QUIT command from the AUTHORIZATION state, the POP3 session terminates but does NOT enter the UPDATE state.)
If a session terminates for some reason other than a client-issued QUIT command, the POP3 session does NOT enter the UPDATE state and MUST NOT remove any messages from the maildrop.
QUIT Command
Arguments: none
Restrictions: none
Discussion: The POP3 server removes all messages marked as deleted from the maildrop and replies as to the status of this operation. If there is an error, such as a resource shortage, encountered while removing messages, the maildrop may result in having some or none of the messages marked as deleted be removed. In no case may the server remove any messages not marked as deleted.
Whether the removal was successful or not, the server then releases any exclusive-access lock on the maildrop and closes the TCP connection.
Possible Responses:
+OK-ERR
Examples:
C: QUIT
S: +OK dewey POP3 server signing off (maildrop empty)
C: QUIT
S: +OK dewey POP3 server signing off (2 messages left)
Glossary:
- UPDATE state: Final cleanup phase
- maildrop: User's mailbox on the server
- exclusive-access lock: Prevents concurrent modifications