Telnet - POP3 Commands (receiving mail using telnet)
Telnet from your computer to the mail server:
telnet mail.domain.ext 110
alternatively you can use openssl to talk to a pop3s server:
openssl s_client -connect mail.domain.ext:995
You should receive a reply like:
+OK POP3 localhost.localdomain v2000.70rh server ready
For the initial connection, and each command that you enter, the mail server will respond with either:
Commands that you can use are:
This must be the first command after the connect. Supply your e-mail userid (not the full e-mail address).
This must be the next command after USER. Supply your e-mail password. The password may be case sensitive.
The response to this 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.
The response to this lists a line for each message with its number and size in bytes, ending with a period on a line by itself.
+OK 3 messages
This retrieves the specified message "msg#" (and displays it on the Telnet screen). You probably don't want to do this in Telnet (unless you have turned on Telnet logging).
TOP msg# #lines
This is an optional POP3 command. Not all POP3 servers support it. It lists the header for "msg#" and the first "#lines" of text in the message.
TOP 1 0would list just the headers for message 1, whereas
TOP 1 5would list the headers and first 5 lines of the message text.
This marks message number "msg#" for deletion from the server. This is the way to get rid of a problem causing message. 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 shouldn't delete any messages.
This resets (unmarks) any messages previously marked for deletion in this session so that the QUIT command will not delete them.
This deletes any messages marked for deletion, and then logs you off of the mail server. This is the last command to use.