Post Office Protocol

Reprinted by permission from Matt Mussleman

Table of Contents

POP3 Commands

Command Syntax Description
USER user Username Provides username to the POP3 server. Must be followed by a PASS command.
PASS pass Password Provides a password to the POP3 server. Must follw a USER command.
STAT stat Returns the number of messages and total size of mailbox.
LIST list
list MessageNumber
Lists message number and size of each message. If a message number is specified, returns the size of the specified message.
LAST last Returns the message number of the last message not marked as read or deleted.
RETR retr MessageNumber Returns the full text of the specified message, and marks that message as read.
TOP top MessageNumber lines Returns the specified number of lines from the specified mesasge number.
DELE dele MessageNumber Marks the specified message for deletion.
RSET rset Resets any messages which have been marked as read or deleted to the standard unread state.
NOOP noop Returns a simple acknowledgement, without performing any function.
APOP apop Username EncryptedKey Allows for a secure method of POP3 authentication, in which a cleartext password does not have to be sent. Instead, the client creates an MD5 encrypted string from the password, process id, and timestamp, and sends it to the POP3 server.
QUIT quit Ends the POP3 session

Example POP3 Session

+OK QPOP (version 2.53) at starting.  <>
user matthew
+OK Password required for matthew.
pass password
+OK matthew has 2 messages (773 octets).
+OK 2 773
+OK 2 messages (773 octets)
1 391
2 382
retr 1
+OK 391 octets
Return-Path: griselda
Received: (from griselda@localhost)
        by (8.9.3/8.9.3) id DAA84577
        for matthew; Tue, 12 Oct 1999 03:19:21 GMT
        (envelope-from griselda)
Date: Tue, 12 Oct 1999 03:19:21 GMT
From: Test User 
Message-Id: <>
To: matthew
Subject: Test
X-UIDL: 858de06153a9e0e3c235a4a54c4f56d3
Status: RO

This is a test.

+OK 1 is the last read message.
top 2 5
+OK 382 octets
Return-Path: griselda
Received: (from griselda@localhost)
        by (8.9.3/8.9.3) id DAA84593
        for matthew; Tue, 12 Oct 1999 03:21:28 GMT
        (envelope-from griselda)
dele 2
+OK Message 2 has been deleted.
+OK Pop server at signing off.
Connection closed by foreign host.

For More Information

RFC 1460, Revision to Post Office Protocol, Version 3
The latest set of specifications for the POP3 protocol.
RFC 1225, Post Office Protocol, Version 3
Original POP3 specifications
Explanation of the Simple Mail Transfer Protocol