Ever wondered how to test and maintain your mailbox without an email client? This quick guide on the manual POP3 commands will help you out.
Below is a list of frequently used POP3 commands. In order to perform the following commands, all you will have to do is connect to the mail server using Telnet with the IP or DNS name of the server on port 110 (Example: telnet 127.0.0.1 110).
Log on with your Username
USER is the first command after the connection is established. To connect, all you have to do is supply your e-mail user id.
Example:
USER john.smith
Complete login with your password
After having supplied your user name, the next command is to supply your e-mail password.
Example:
PASS *****
Keep in mind that it may be case sensitive. Once the authentication of your user name and password has been done you will be able to display and manipulate the contents of your e-mail.
View number of messages
The response to the command STAT is +OK #msgs #bytes , where #msgs is the number of messages in the mail box and #bytes is the total bytes used by all messages.
Sample response:
+OK 3 345910
Display a summary of your messages
The response to LIST is a line for each message including its number and size in bytes, ending with a period on a line by itself.
Sample response:
+OK 3 messages
1 1205
2 305
3 344400
.
Retrieve old hard to find e-mails
RETR will send message numbers (msg#) to you and display them on the Telnet screen. You probably don’t want to do this in Telnet, unless you have turned on Telnet logging.
Example:
RETR 2
Retrieve the specific amount of message you want displayed
TOP is an optional POP3 command and not all POP3 servers support it. It lists the header for the relevant message (msg#), as well as the amount of lines (#lines) one might wish to view from the message text.
For example, TOP 1 0 would list just the headers for message 1, whereas TOP 1 5 would list the headers and first 5 lines of the message text.
Delete your unwanted messages
DELE marks message numbers (msg#) for deletion from the server. This is how to get rid a problem causing message although it is not actually deleted until the QUIT command is issued.
If you lose the connection to the mail server before issuing the QUIT command, the server should not delete any messages.
Example:
DELE 3
Reset your session to its initial state
RSET resets (un-marks) any messages previously marked for deletion during your session so that the QUIT command will not delete them.
To end the POP3 conversation, quit
QUIT deletes any messages marked for deletion, and then logs you off of the mail server. This is the last command to use. QUIT does not disconnect you from the ISP, it just disconnects the mailbox.
There are other POP3 commands for which you can reference the RFC 1939.
Leave a Comment