Search for mail exchanger (MX) records using dig

Contributor Icon Contributed by Rex Date Icon December 1, 2003  
Tag Icon Tagged: BIND and DNS

Mail exchanger or MX records in DNS are used to route email for a domain. The dig utility makes it easy to search for this type of DNS record.


To search for the MX records for the domain tech-recipes.com, use:

dig mx tech-recipes.com

This will query the DNS server configured in your operating system. Often times it is useful to query against a different DNS server. To perform the same query above against the name server ns3.notarealdomain.com:

dig @ns3.notarealdomain.com mx tech-recipes.com

Previous recipe | Next recipe |
 
  • TIm?
    Thanks for the tip! Very handy. I am new to mail servers and this is great!
blog comments powered by Disqus