DOS Prompt

MX Record and Telnet Example

Last reviewed: 30/03/2015

This is an example of using multiple command line tools to verify information about an email server. This is old information for microsoft.com, but the procedure still applies.

First, get the MX record information. You can either do this using interactive nslookup or single line:

Interactive NSLOOKUP

C:\>nslookup
Default Server:  server.domain.co.uk
Address:  192.168.1.1

> set type=mx
> microsoft.com
Server:  server.domain.co.uk
Address:  192.168.1.1

Non-authoritative answer:

microsoft.com   MX preference = 10, mail exchanger = mailc.microsoft.com
microsoft.com   MX preference = 10, mail exchanger = maila.microsoft.com
microsoft.com   MX preference = 10, mail exchanger = mailb.microsoft.com

maila.microsoft.com     internet address = 131.107.1.7
maila.microsoft.com     internet address = 131.107.1.6
mailb.microsoft.com     internet address = 131.107.3.123
mailb.microsoft.com     internet address = 205.248.102.77
mailc.microsoft.com     internet address = 205.248.102.78
mailc.microsoft.com     internet address = 205.248.102.79
>
 

Single Line

nslookup -type=MX microsoft.com

or if you want to use a public DNS server

nslookup -type=mx microsoft.com 8.8.8.8

Telnet Test

When you have the MX server information, see if you can telnet to port 25 of the remote server. As you can - each server has multiple IP addresses.

For example (using the above information)

telnet maila.microsoft.com 25

You should then get a banner similar to this:

220 mail04.microsoft.com Microsoft ESMTP MAIL Service ready at Thu, 7 Jan 2010 05:57:59 -0800

You can do further email acceptance tests using additional commands. The full telnet test procedure is outlined here: http://exchange.sembee.info/network/telnet-test.asp