Friday, December 11, 2009

Want to send and receive mail via telnet?

Want to send and receive mail via telnet? This can be a very good troubleshooting tool.

To send mail:

Bring up telnet

Type "open (your mail server here) 25"
This will connect to your mail server on port 25 (the smtp port) SMTP stands for Simple Mail Transfer Protocol.


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.


If you want the mail server/receiver of the email to know who this email is from type "MAIL FROM: yourname@yourmaildomain.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.


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).

Then type

"DATA"


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!

Type your message


Then terminate the message with the appropriate character
At this point you generally type "QUIT" to disconnect as your message is sent.


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.

Go to the start menu and hit run
Type in "telnet". This will bring up a window that will display microsoft telnet etc.
Type in "open (name of your mail server here) 110"
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)
Now type "USER (your username here)"
When asked for a password type "PASS (your password here)"

*** As a side not this is where your user name and password go accross the internet in clear text as will the rest of your message ****


It should give you a little mailbox stat message if you typed everything in correctly.

To retrieve the status of your mailbox type "STAT"

This first number will be the number of messages you have and the second number will be the amount of space they take up.

Now type "LIST" to the list the messages

It will list the message numbers followed by how large they are.

To retrieve a message type "RETR (message number)"
To delete a message type "DELE (message number)"
To quit type "QUIT"


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.

No comments: