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


Symptom

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

Cause

none

Solution

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

 dig mx lubby.org

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

;; QUESTION SECTION:
;lubby.org.                     IN      MX

;; ANSWER SECTION:
lubby.org.              86176   IN      MX      20 mx01.kundenserver.de.
lubby.org.              86176   IN      MX      10 lubby.org.

;; AUTHORITY SECTION:
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      TLD3.ULTRADNS.org.
org.                    14283   IN      NS      TLD4.ULTRADNS.org.
org.                    14283   IN      NS      TLD5.ULTRADNS.INFO.

;; ADDITIONAL SECTION:
lubby.org.              85786   IN      A       87.106.55.67

;; Query time: 4 msec
;; SERVER: 192.168.123.3#53(192.168.123.3)
;; WHEN: Tue Sep  4 17:07:01 2007
;; MSG SIZE  rcvd: 257

Disclaimer:

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.