The POP Protocol:
There are two versions of POP: POP2 and POP3. The POP protocols verify the user's login name and password, and move the user's mail from the server to the user's local mail reader. Both protocols perform the same basic functions, but they are incompatible. POP2 uses port 109, and POP3 uses port 110. Linux systems come with both versions of POP, but POP2 is rarely used. Most POP clients use POP3.
POP3 is defined in RFC 1939, "Post Office Protocol—Version 3." It is a simple request/ response protocol. The client sends a command to the server, and the server responds to the command. The table below shows the set of POP3 commands defined in RFC 1939.
Command | Function |
USER username | The username required for the login. |
PASS password | The user's password required for the login. |
STAT | Requests the number of unread messages/bytes. |
RETR msg | Retrieves message number msg. |
DELE msg | Deletes message number msg. |
LAST | Requests the number of the last message accessed. |
LIST [msg] | Requests the size of message msg or of all messages. |
RSET | Restores deleted messages, and resets the message number to 1. |
TOP msg n | Prints the headers and the first n lines of message number msg. |
NOOP | Does nothing except request an OK response from the remote server. |
APOP mailbox string | Identifies a mailbox, and provides an MD5 digest string for authentication. Used as an alternative to USER/PASS. |
UIDL [msg] | Requests the unique ID for the specified message number, or a listing of unique IDs for all messages. |
QUIT | Ends the POP3 session. |
.