LKBEN10944: Resolve MX records with dig to get the responsible Mail server for a domain.


You would like to know the MX record for a certain domain.




You can use the dig command and ask for mx records:

 dig mx

; <<>> DiG 9.3.2 <<>> mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40151
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 6, ADDITIONAL: 1

;                     IN      MX

;; ANSWER SECTION:              86176   IN      MX      20              86176   IN      MX      10

org.                    14283   IN      NS      TLD6.ULTRADNS.CO.UK.
org.                    14283   IN      NS      TLD1.ULTRADNS.NET.
org.                    14283   IN      NS      TLD2.ULTRADNS.NET.
org.                    14283   IN      NS
org.                    14283   IN      NS
org.                    14283   IN      NS      TLD5.ULTRADNS.INFO.

;; ADDITIONAL SECTION:              85786   IN      A

;; Query time: 4 msec
;; WHEN: Tue Sep  4 17:07:01 2007
;; MSG SIZE  rcvd: 257


The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!

About the Author

Author: Wim Peeters - Keskon GmbH & Co. KG

Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.