RSS Feed for This PostCurrent Article

Access Your Email Using Telnet

This is a simple trick that you may already know. It is very easy to access your email if your email server supports POP3 protocol. By right all email servers should support this protocol. The default port for POP3 is 110.

$ telnet pop.myserver.com 110
Trying 16.1.3.4...
Connected to pop.myserver.com.
Escape character is '^]'.
+OK QPOP (version 2.4) at pop.myserver.com starting.  
USER twit88
+OK Password required for twit80
PASS mypassword
+OK twit88 has 3 messages (12248 octets).
STAT
+OK 3 1548
LIST
+OK 3 messages (12248 octets)
1 344
2 386
3 ...
.
TOP 1 10
+OK 344 octets
Return-Path: 
Received: (from anyone@localhost)
by pop.myserver.com (8.8.8/8.8.8) id SAA29469
for user.123; Wed, 3 Dec 2008 18:54:54 -0500 (EST)
Date: Wed, 3 Dec 1997 18:54:54 -0500 (EST)
From: anyone 
Message-Id: <[email protected]>
X-Real-To: twit88
Subject: Hi!
X-UIDL: b7bf8f395f5fea1e6ad4964ca202e979
Status: U

.

USER userid
First command to supply your e-mail userid (not the full e-mail address). Example: USER twit88

PASS password
Next command after USER. Supply your e-mail password. The password may be case sensitive.

STAT
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. Sample response: +OK 3 345910

LIST
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. Sample response:
+OK 2 messages
1 15
2 10000

RETR msg#
Display the message

TOP msg# #lines
Optional POP3 command. Not all POP3 servers support it. It lists the header for msg# and the first #lines of the message text. For example, TOP 1 10 would list the headers and first 10 lines of the message text.

DELE msg#
This marks message number msg# for deletion from the server. This is the way to get rid 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 should not delete any messages. Example: DELE 5

RSET
This resets (unmarks) any messages previously marked for deletion in this session so that the QUIT command will not delete them.

QUIT
This deletes any messages marked for deletion, and then logs you off of the mail server. This is the last command to use. This does not disconnect you from the ISP, just the mailbox.

POP3 protocol is described in details in RFC 1939.

A useful article for Windows is available here.


Trackback URL


RSS Feed for This Post1 Comment(s)

  1. jitendra | Apr 16, 2009 | Reply

    how to send mail form telenet server?

Sorry, comments for this entry are closed at this time.