Trivial uses of Telnet - POP3
Continued from
page 3 - "Popular ways to hide who you really are on the web - proxy servers and wingates."
POP3 - incoming e-mail
POP3 standard for
Post
Office
Protocol version
3, this is a very simple type of
mailbox - it simply holds messages in the order they arrived and supports no extra sophistication, however
by virtue of it being so simple it is also one of the most popular types of mailbox. Standards suggest that
the POP3 service should listen on port 110, although again it is trivial to reconfigure the service to listen
on another port.
The commands are far simpler than those used by HTTP - there are only a few key commands you need to know to
work with it:
- USER x - selects the mailbox for user "x".
- PASS x - enters the password ("x") for the currently selected mailbox.
- LIST - presents a simple list of the literal numbers of messages along with their size.
- RETR x - retrieves message "x" in full, displaying it to the console.
- TOP x y - retrieves the top "y" lines of message "x", displaying it to the console.
- DELE x - marks message "x" for deletion
- RSET - unmarks all messages marked for deletion
- QUIT - deletes any marked messages and ends your connection to the service
The first thing you will notice is that the protocol is authenticated, this is important because obviously you
would not want anyone who has half a clue to be able to meddle with your mailbox would you? During a normal
session the first thing you would do is issue
USER followed by
PASS so you have access to your
mailbox.
The majority of the messages the service returns from any actions the user takes are in the form of
+OK {text}
or
-ERR {text}. The prefix indicates whether the command was sucessful or not, and if nopt should explain
why not.
A very basic session which listed all the mail and then looked at one or two of them would look like this, the
sample assumes that you have successfully connected to a pop3 service:
+OK Microsoft Exchange POP3 server version 5.0.1457.10 ready
USER bob
+OK name is a valid mailbox
PASS jones
+OK mailbox locked and ready
LIST
+OK 3 messages (6208 octets)
1 1903
2 4255
3 25
RETR 2
+OK message follows
[display message 1]
TOP 3 10
+OK top of message follows
[display of top 10 lines of message 3]
DELE 3
+OK message deleted
QUIT
+OK host closing connection
As you can see this allows you a lot of access to your messages in their raw form, and aside from deleting them
and thus avoiding lengthy or locked up downloads you can view full header and content data at the same time, safe
in the knowledge that it hasn't been altered by your mail client.
Continued on
page 5 - "How to create & send your e-mails via the SMTP protocol."