How to Access your Email box using Telnet
What would you do when you receive mail bombs ? Are you going to download them ?. Well that is the worst thing you can do. If you are a bit smart, you can login to your POP account and simply delete the mail bomb. This is a classic example where Telnetting the Email box comes handy.
Note: mail bomb is an extremely big unwanted file received by your mail box which will take hours to download, costing extra money. The term mail bomb is not referred here to a parcel bomb you receive by snail mail. If you have received that sort of a mail bomb then the following procedure will not help, instead you are advised to call the nearest Police station.
The Internet protocol associated with email accounts is POP, or Post Office Protocol. POP is usually accessed on port 110 of your Internet provider's POP server. Now what you have to do is to start an telnet session. If you are using an MS-Windows based telnet client, set the host as your.pop.server , port as 110 , and Terminal as VT-100 . Then click the connect button.
If you are under UNIX, type the following at the prompt.
telnet your.pop.server 110
eg. My email address is firstname.lastname@example.org , therefore my POP server is cse.mrt.ac.lk
Now let's go through the following sample telnet session. You will get to know the commands and their usage as we progress. After you have connected to the POP server, a message similar to the below will appear. Let's continue from there.
+OK sigiri POP3 Server (Version 1.004) ready.
Use your login name instead manages, don't use mine.
+OK please send PASS command
Use your email password, not mine.
+OK 2 messages ready for manages in /usr/spool/mail/manages
Note: Unlike most times when you enter your password, this time you will see it as you enter it. Please make sure that no one is staring at your screen over your shoulders.
list This will display the total number of messages and size again as well as a list with each file number, a space and its size. something similar to the following:
+OK 2 messages; msg# and size (in octets) for undeleted messages:
retr 2 Displays the message-2 including headers.
top 1 20 Displays the first 20 lines of the message-1. Unlike the retr command, this will not scroll the message to the end . It just shows the first 20 lines of the message body. This is useful if you want to read the whole message. The syntax of the retr command is
retr messageNo NumberOfLines
dele 2 Deletes the message-2. This is how you delete a message. You will see the confirmation for the deletion. In fact the message-2 is a mail bomb, you can identify it from the size. It is rather unusual to have a legitimate message of over 1MB.
+OK message 2 marked for deletion
If you type list again, you will see that message number 2 is indeed gone.
There are few more commands I have not discussed, the best way to learn them is to issue an incorrect command.
-ERR Invalid command; valid commands: DELE, HOST, LAST, LIST, MBOX, NOOP, RETR, RSET, STAT, TOP or QUIT
Now you can play with the rest of commands. Note that some POP servers do not give this error message.
quit ends your session. Simply closing the telnet session may hang your mailbox.
However there are limitations with this method, this will not be as sophisticated as working with your favorite mail client such as Eudora or Pegasus Mail, for instance you can't reply to a message.
The Internet protocol used in the transfer of e-mail is SMTP, or Simple Mail Transfer Protocol.
SMTP is usually accessed on port 25 of your Internet provider's SMTP server. My SMTP server is cse.mrt.ac.lk . See the SMTP server setting in your mail client if you don't know your SMTP server. Your Internet Provider's SMTP server will offer you a faster service, but you can use any SMTP server.
If you are using a MS-Windows based telnet client, set the host as your.smtp.server , port as 25 , and Terminal as VT-100 . Then click the connect button.
If you are under UNIX, type the following at the prompt.
telnet your.pop.server 25
First follow the list of the commands and their syntax. Later we will see a sample telnet session.
HELO <hostname> Introduce yourself.
EHLO <hostname> Introduce yourself and request extended SMTP mode.
MAIL FROM: <sender> Specifies the sender.
RCPT TO: <recipient> Specifies the recipient. Can be used any number of times. Useful when you are sending multiple copies to deferent users.
DATA Following text is collected as the e-mail message. End message with a period on a line by itself.
RSET Resets the system. Once reset, a new sender can be specified.
QUIT Exit sendmail (SMTP)
HELP Gives command info. If used alone, displays commands implemented on specific system.
HELP <command> specific information on that command is given.
After you have connected to the SMTP server, you will see a message similar to the following. Let's continue from there.
220-sigiri.learn.ac.lk Sendmail 8.6.12/learn.S.3 ready at Thu, 12 Jun 1997 15:07:29 +0600
220 ESMTP spoken here
HELO cse.mrt.ac.lk Introducing my host
250 sigiri.learn.ac.lk Hello email@example.com [126.96.36.199], pleased to meet you
MAIL FROM: firstname.lastname@example.org Specifying the sender
250 email@example.com... Sender ok
RCPT TO: firstname.lastname@example.org Specifying the recipient
250 email@example.com... Recipient ok
354 Enter mail, end with "." on a line by itself
Thanks for helping me in writing this tutorial.
C ya later.
250 QAA05106 Message accepted for delivery
At this point the message is sent to the recipient.
214- HELO EHLO MAIL RCPT DATA
214- RSET NOOP QUIT HELP VRFY
214- EXPN VERB
214-For more info use "HELP <topic>".
214-To report bugs in the implementation send email to
214-For local information send email to Postmaster at your site.
214 End of HELP info
quit end of session
Fun Tip : You can specify a fake host as your host and a fake email address as sender's email address. In this way, it is very difficult for the recipient to figure out the sender of the email.