dig command is a very useful DNS lookup utility. It can be used to retrieve DNS records information of any domain name by querying specifc DNS servers. It is also a great troubleshooting tool for any admin configuring or troubleshooting existing DNS server.
To retrieve domain MX records simply use MX option in combination to domain name you wish to query. For example the below command will query MX records for boobi.com:
[root@mail ~]# dig boobi.com mx
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6_9.4 <<>> boobi.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53205
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
;; QUESTION SECTION:
;boobi.com. IN MX
;; ANSWER SECTION:
boobi.com. 86400 IN MX 0 mail.boobi.com.
;; AUTHORITY SECTION:
boobi.com. 86400 IN NS ns1.boobi.com.
;; ADDITIONAL SECTION:
mail.boobi.com. 86400 IN A 192.168.1.115
ns1.boobi.com. 86400 IN A 192.168.1.115
;; Query time: 1 msec
;; SERVER: 192.168.1.115#53(192.168.1.115)
;; WHEN: Wed Aug 9 17:22:00 2017
;; MSG SIZE rcvd: 98
To retrieve domain MX records simply use MX option in combination to domain name you wish to query. For example the below command will query MX records for boobi.com:
[root@mail ~]# dig boobi.com mx
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6_9.4 <<>> boobi.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53205
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2
;; QUESTION SECTION:
;boobi.com. IN MX
;; ANSWER SECTION:
boobi.com. 86400 IN MX 0 mail.boobi.com.
;; AUTHORITY SECTION:
boobi.com. 86400 IN NS ns1.boobi.com.
;; ADDITIONAL SECTION:
mail.boobi.com. 86400 IN A 192.168.1.115
ns1.boobi.com. 86400 IN A 192.168.1.115
;; Query time: 1 msec
;; SERVER: 192.168.1.115#53(192.168.1.115)
;; WHEN: Wed Aug 9 17:22:00 2017
;; MSG SIZE rcvd: 98
dig GUI (dig command web interface)
ReplyDeletehttps://www.diggui.com/