QmailtoasterMain Page | About | Help | FAQ | Special pages | Log in

Printable version | Disclaimers | Privacy policy

How to use telnet for diagnostics

From Qmailtoaster

How to use telnet to troubleshoot problems

Telnet is a very versatile tool, and can be used to test various things with a mail server. To send a message to an existing user on your server to test mail flow:

telnet mail.your-domain.com 25
HELO desktop
MAIL FROM: you@remote.com
RCPT TO: you@your-domain.com
Subject: Testing
Whatever else you want to say.

What this does, line by line, is:

1. Open a telnet session to your server on port 25 (best used when telnet'ing from an outside network)
2. Telling the server your local name you're sending mail from (this is usually your computer's network name, with optional domain name appended). You should receive a 250 code back.
3. Who the mail is from (RBL check will apply, and you can test DNS timing as well - how long does it take to get a 250 - ok reply back?  This will tell you how long your server is spending doing reverse DNS lookups/RBL lookups.
4. This is who the message is to.  You should receive a 250 ok message back if the user exists, or an error if the user does not exist.
5. You're letting the server know that the message data is going to be next.
6. This will be the subject of the message.  While technically not required, it does make it easier to find the message if you get a lot of them.
7. The actual message body.  Type whatever you want.
8. The period (.) on it's own line, all by itself, tells the server that you are DONE sending the data to it and to deliver the message.
9. You need to let the remote server know you want to quit, or it will wait for the next SMTP command (mailers would normally check mail here, or send another message)

A key thing to note is that you cannot use the backspace/delete key during the telnet session (at least not on the command portions). You will receive an error if you try and delete backwards because you misspelled RCPT TO: or the email address.

Retrieved from "http://wiki.qmailtoaster.com/index.php/How_to_use_telnet_for_diagnostics"

This page has been accessed 9,929 times. This page was last modified on 8 December 2008, at 18:24. Content is available under GNU Free Documentation License 1.2.


Main page
Community portal
Current events
Recent changes
Random page
View source
Editing help
This page
Discuss this page
New section
Printable version
Page history
What links here
Related changes
My pages
Log in / create account
Special pages
New pages
File list