Using nslookup To Find MX Records

If you need to lookup a MX record then you will probably need to do this via nslookup or some of the other tools or websites that are available for this job.
For those of you who don’t know, A MX record is a type of resource record in DNS that specifies a mail server responsible for accepting email messages on behalf of a recipient’s domain and a preference value used to prioritize mail delivery if multiple mail servers are available. The set of MX records of a domain name specifies how email should be routed with the Simple Mail Transfer Protocol.
As nslookup is part of windows already it is a handy tool for most system administrators to use, but many are not 100% sure how to use it.  I will now show you the very basics of using nslookup to check a MX record.
So, from a command prompt you type  nslookup  this then will return with a  >  prompt, here you type  set type=mx   this tells nslookup that you want to do a MX record query, now you type the domain name e.g google.com  but no www in front.  This will now return the MX entry’s for that domain. 
Non-authoritative answer:
google.com MX preference = 10, mail exchanger = smtp2.google.com
google.com MX preference = 10, mail exchanger = smtp3.google.com
google.com MX preference = 10, mail exchanger = smtp4.google.com
google.com MX preference = 10, mail exchanger = smtp1.google.com

smtp2.google.com internet address = 64.233.165.25
smtp3.google.com internet address = 64.233.183.25
smtp4.google.com internet address = 72.14.221.25
smtp1.google.com internet address = 209.85.237.25
>

The results above show that google.com has 4 MX records, all set to preference 10 (like a round robin approach), and then it list the IP’s for each MX hostname.

Duncan

Leave a Reply