How To Telnet To A Mail Server

Something
to think
about...



Internet Bumper Stickers > more


Home

$1.50 ebooks! Free Shipping!

Featured Sites

Articles:

Web Promotion
Email Marketing Tips
Search Submission
Free Magazine Advertising
Deadbeat Clients
Stop Telemarketers
College Contrarian Viewpoint
Googlewhacking

Guides:

Unix User Guide
How To Telnet To A Mail Server
How to Use PHP Tables Instead of Frames
How To Structure an Introductory Email
Sequential Autoresponders
Improving Your Ezine
Viral Marketing And The Internet

Free Tools:

BooksLister

Resources:

Web Site Promotion Books

My Humor:

The "Other" Amazon Associates Program
Sleepless Associates
Fun With Telemarketers
Sponge Bob

Games

Letters from readers


Bookstore
My Business Cards
Site Search
Contact Me
Disclaimer

Telnetting to a Mail Server

Background Knowledge

Author: roddefig

This tutorial applies to all OSes but I will use Windows as an example. The only difference will be how to connect and launch your telnet client.

Anyways, we will be using 2 protocols during this tutorial, SMTP, and POP3. SMTP stands for Simple Mail Transfer Protocol and is used for sending mail. POP3 stands for Post Office Protocol 3 and is used for retrieving mail.

What is telnet? Telnet is basically a terminal emulator. Terminals are basically a monitor and a keyboard and in the early ages of computers were used to connect to a mainframe which did all of the processing work for the terminal. The only difference between a terminal and telnet is that in telnet you use TCP/IP and connect without a serial cable (old terminals were interfaced through serial ports).

Alright then, now we need to start up the telnet client. In Windows go to "Start", and click on "Run". Then type "cmd". This will pop up a Dos window. On the command line type "telnet". This will bring up the telnet client. To connect to a site type "open [the dns of the site or ip] [port]". What is a port? Imagine a great board of holes all with numbers above them. This is your connection. If you have a firewall most of these "holes" would be closed. Your internet connection uses ports to transfer data to certain programs or "services". We will be using port 110 (pop3) and 25 (smtp).

SMTP - To Send Mail

To send mail:

  1. Bring up telnet
  2. Type "open (your mail server here) 25"
  3. This will connect to your mail server on port 25 (the smtp port) SMTP stands for Simple Mail Transfer Protocol.
  4. Type "HELO (site you want the mail server to record you connecting from...this can be anything you want)" Some mail servers do not require this line.
  5. If you want the mail server/receiver of the email to know who this email is from type "MAIL FROM: yourname@whereever.com (replace this with whatever you want)" **Note: Some mail servers require this line...if you get an error that blank sender is not allowed than use this command.
  6. To tell the mail server where you want your mail to go to type "RCPT TO: (where you want the mail to go)". **Warning: If you incorrectly enter the destination of the mail it will be sent to the postmaster of the receiving server (usually the mail server will give you an error informing you that the user does not exist and that this message will be sent to the postmaster).
  7. Then type "DATA"
  8. The mail server will give you specific instructions on how to terminate the message (usually a "." on a line by itself) you must use this or else you will not be able to send the message!
  9. Type your message
  10. Then terminate the message with the appropriate character
  11. At this point you generally type "QUIT" to disconnect as your message is sent.

POP3 and Concluding Notes

Author: roddefig
To receive email using telnet in windows do the following (this is the same for linux...except for the directions to open telnet and connect...but if you use linux you should be smart enough to figure it out yourself). If you think that something isn't working look at the notes first.

  1. Go to the start menu and hit run
  2. Type in "telnet". This will bring up a window that will display microsoft telnet etc.
  3. Type in "open (name of your mail server here) 110"
  4. This should connect to your mail server if it uses POP (Post office protocol) on port 110. For those of you who use yahoo this won't work (though you can send mail)
  5. Now type "USER (your username here)"
  6. When asked for a password type "PASS (your password here)"
  7. It should give you a little mailbox stat message if you typed everything in correctly.
  8. To retrieve the status of your mailbox type "STAT"
  9. This first number will be the number of messages you have and the second number will be the amount of space they take up.
  10. Now type "LIST" to the list the messages
  11. It will list the message numbers followed by how large they are.
  12. To retrieve a message type "RETR (message number)"
  13. To delete a message type "DELE (message number)"
  14. To quit type "QUIT"
  15. You may quit at any time during this process by typing "QUIT". Also using the escape character or control-c may work. Note: this applies to my mail server and mail servers that I've used but may not apply to all. For example, Netscape will submit an "AUTH" command after the username is entered and my mail server will return an error message. It will then try the "PASS" command and this will work.

Notes:

  • Some mail servers may not allow "relay" that is sending the mail to a non-local address. If this is the case you will generally get a message saying that relay is not allowed. Also some servers require smtp authenthication using a username/password. I haven't encountered this before but if it does then maybe you can use the commands for accessing mail above?
  • Mail servers do not "echo characters" that is you will not see what you type. Do not think that telnet/mail server is not working...this is normal.
  • The "Delete" key does not work...therefore you cannot correct typing errors. If you make a mistake then all you can do is disconnect and restart or try again (if it was a password/username).
  • After sending an email and viewing the commands I noticed that when my server contacted hotmail's server it used "EHLO" instead of the standard "HELO" I described above. Try this if the other one does not work?
For help: If you have any questions feel free to email me.

Copyright Notice: You are free to distribute this as long as you give credit to me :P) This tutorial written by roddefig@1337net.dyndns.org.


Software: Rumba Telnet Editon 7.1 1-user License


Software: RUMBA TELNET ED. 7.1 CARD 1U


Electronics: Landel LT-301 MailBug Email and Internet Appliance


Programming Internet Email
by by Dave Wood


Managing in the Email Office
(COMPUTER WEEKLY PROFESSIONAL)
by by Monica E. Seeley


Overcome Email Overload with Microsoft Outlook 2000 and Outlook 2002: Get Through Your Electronic Mail Faster
by by Kaitlin Duck Sherwood

Get your Amazon List at GarnetChaney.com

From Guides


Please link to us! - Sitemap
Garnet Chaney wants to remind you that no information found at his web sites can replace a meeting with your physician about your health.

Copyright 2001-2007 By Garnet R. Chaney. All Rights Reserved.

Edit Published:8/23/2007 6:12 PM with Confluence Republisher v0.02