POP - Version 1

Introduction

The Post Office Protocol (POP) was first issued on October 1984. It was published in RFC 918.
The protocol suggests a simple method for workstations to access mail from a mailbox server.
The protocol is dependent upon TCP (Transfer Control Protocol) and assumes that mail is posted by SMTP (the POP deals only with mail retrieval - not with mail posting).
This protocol is the de-facto protocol for retrieving mail from a mail server, due to its easy implemantaion, and simplicity of use, which does not hurt its strength.

 

Protocol Explanation

The server waits for a client to open a connection. When one is opened the server sends a greeting message and waits for commands to come from the client. The server responds to each command with an appropriate reply.

The client opens a connection and waits for the server to respond with a greeting. When accepted it sends a user name and a password in order to establish authorization to access the mailbox. Once authorized the client asks to begin the reading transaction. The server opens the mailbox, locks it and returns the number of characters in the mailbox along with the acknowlegment. The client can then asks for data to be sent using various methods like LIST the messages, RETRieve a specific message ot just its headers, etc. After the server sent the data, the client responds with an acknowledgement. The server can now unlock the mailbox and close it. The client terminates the session.

 

Commands

USER name
Identifying the client.
Reply: +Ok or -Err
 
PASS password
Confirm clients identity. The USER and PASS commands are both used by the server to control access to the mailbox. The PASS command must follow the USER command.
Reply: +Ok or -Err
 
RETR mailbox
This command begins the mail reading transaction. It implies that no message should be deleted after reading.
Reply: number of characters in the mailbox or -Err
 
RDEL mailbox
This command begins the mail reading transaction. It implies that all the messages in the mailbox must be deleted after reading.
Reply: number of characters in the mailbox or -Err.
 
RCEV
Confirmation that the client is ready to receive the data.
Reply: +Ok or aborting connection
 
RCVD
Confirm that the client has received the mail. In case of RDEL the messages should be deleted (that is implied by the response).
Reply: +Ok or -Err
 
QUIT
Request for termination of the session.
Reply: +Ok and closing connection.
 
NOOP
A no operation command.Reply: +Ok
 
RSET
Request for aborting the transaction.
Reply: +Ok

 

Now that you know what the POP is go to a demonstration of POP.

Don't forget to see the POP3 explanation too, because POP is no longer in use and POP3 is the actual protocol you use daily to read your mail.

 

 


References:
RFC 918 - POP