Posted by: isaraffee | August 9, 2009

Reading Mail with Telnet

Reading Mail with Telnet

Each request to and response from the POP server is in cleartext ASCII, which means it’s very easy for you to test the functionality of a POP server using telnet,. This is especially useful when you have users complaining that the mail server is not working.But in fact the usersare unfamiliar with the system.

You begin by telneting to the POP3 server. Type:

[root@venus /root]# telnet venus.localdomain 110

Trying 169.254.34.253…

Connected to venus.localdomain.

Escape character is ‘^]’.

+OK POP3 venus.localdomain v2000.69mdk server ready

Log in as a user, by using the USER command:

USER aisha

+OK User name accepted, password please

Now tell the server your password,using the PASS command:

PASS xxxxxxx

CAUTION

The system will echo back your password, so don’t do this if you have people looking over your shoulder

+OK Mailbox open, 1 messages

List the messages in the inbox by typing the LIST command:

LIST

+OK Mailbox scan listing follows

1 459

.

It seems that we only have 1 message. Now let’s read message 1 using the RETR command:

RETR 1

+OK 459 octets

Return-Path: <root@venus.localdomain>

Delivered-To: aisha@venus.localdomain

Received: by venus.localdomain (Postfix, from userid 0)

id A415572240; Wed, 2 May 2007 09:00:56 +0800 (SGT)

To: aisha@venus.localdomain

Subject: Spiderman 3 Showing Now!

Message-Id: <20070502010056.A415572240@venus.localdomain>

Date: Wed, 2 May 2007 09:00:56 +0800 (SGT)

From: root@venus.localdomain (root)

Status:

Yes you heard me right

It starts this Thursday1

.

To delete a message, type:

DELE 1

+OK Message deleted

To quit, type:

QUIT

+OK Sayonara

Connection closed by foreign host.

The logs from /var/log/mail/info file

May 2 09:15:05 venus ipop3d[1936]: pop3 service init from 169.254.34.253

May 2 09:15:18 venus ipop3d[1936]: Login user=aisha host=venus.localdomain [169.254.34.253] nmsgs=1/1

May 2 09:24:36 venus ipop3d[1936]: Logout user=aisha host=venus.localdomain [169.254.34.253] nmsgs=0 ndele=1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: