Check For Open Relay Using Telnet

pradeep's Avatar author of Check For Open Relay Using Telnet
This is an article on Check For Open Relay Using Telnet in Engineering Concepts.
Rated 5.00 By 10 users
Behind the scenes, the commands sent to mail servers are simple text commands. These commands can be to sent to an email server manually via telnet. This is a quick way to test an email server to determine if it is an open relay.

First, determine the MX for the domain in question, run this command on command prompt:

nslookup type=mx

it should return something like:

Non-authoritative answer:   MX preference = 10, mail exchanger =   MX preference = 20, mail exchanger =   MX preference = 30, mail exchanger =   MX preference = 40, mail exchanger =   MX preference = 50, mail exchanger =   nameserver =   nameserver =	  internet address =	  internet address =   internet address =   internet address =
The first five lines tell you about the mail server (MX = Mail Exchange). In this case, and

So, armed with this knowledge, in command prompt type

telnet 25
Server should respond with: 220

Server responds with: 250 OK

Server responds with: 250 Address Ok.

Server responds with: 250 OK

Server Responds (or may not): 354 Enter Mail
Enter message, then on a new line,

The message should now be sent, if the server does not accept the message its not open relay. By modifying the MAIL FROM and RCPT TO lines, you can test for open relay.
rajkumar_singhalmca's Avatar, Join Date: Aug 2007
Light Poster
i am read this information but you cannot maintain that this service can be use by the l.a.n to w.a.n
pradeep's Avatar, Join Date: Apr 2005
Team Leader
You can, if you have a gateway to the internet!