POP Sessions

POP sessions are very straightforward. They begin with a TCP socket connection from a POP client to TCP port 110 on a POP server. Once connected, the server issues a banner greeting, consisting of a positive status indicator (+OK) and a comment. When the client receives the banner greeting, the POP session has begun.

The first action that a client must take is to issue one of the Authorization State commands to log into a POP mailbox. The client chooses the authentication mechanism that it prefers, and the server must accept or reject it. If the server rejects the client’s advances, it issues a negative status indicator (-ERR), and the client may try again. There is no limit on the number of times that a client may try to find an authentication mechanism that the server will accept.

Once the server accepts the client’s authentication, it locks the chosen mailbox and responds with a positive status indicator. This tells the client that the server is now in the Transaction State. The client may now issue any commands valid in the Transaction State.

At this time, the client may issue any Transaction State commands that it sees fit, in any order. Typically, a client issues a STAT command in order to determine the number of messages in the mailbox followed by a series of RETR and DELE commands to retrieve and mark for deletion every message in the mailbox. When all messages have been processed, a QUIT command is issued to close the session.

This typical example session is illustrated ...

Get Programming Internet Email now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.