LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DNS - MX record not getting from dig (https://www.linuxquestions.org/questions/linux-networking-3/dns-mx-record-not-getting-from-dig-763686/)

jose_tk 10-22-2009 06:51 AM

DNS - MX record not getting from dig
 
Dear all,

After I create a new zone entry and RR for a mydomain.com,
the Nameserver not offering the MX record.

The following is my RR file in the master

$TTL 1D
@ SOA ns1.mynameser.net. dnsmaster.mydomain.com. ( 2009102215
3H
1H
1H
1H )
IN NS ns1.mynameser.net.
IN NS ns2.mynameser.net.
IN NS ns25.domaincontrol.com.
IN NS ns26.domaincontrol.com.
@ IN 7200 A 80.227.124.13
mail.mydomain.com IN 7200 A 80.227.124.3
IN 7200 MX 10 mail.mydomain.com.
www IN 7200 CNAME mydomain.com.


While 'dig' ing for MX, I am getting the following information.

root#>dig @ns1.mynameser.net mydomain.com MX

; <<>> DiG 9.3.3rc2 <<>> @ns1.mynameser.net mydomain.com MX
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25607
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mydomain.com. IN MX

;; AUTHORITY SECTION:
mydomain.com. 3600 IN SOA ns1.mynameser.net. dnsmaster.mydomain.com. 2009102215 10800 3600 3600 3600

;; Query time: 0 msec
;; SERVER: 80.227.124.6#53(80.227.124.6)
;; WHEN: Thu Oct 22 15:46:33 2009
;; MSG SIZE rcvd: 105

Is something wrong in the RR file?
Appreciate your time.

TIA
Jose

bathory 10-22-2009 07:36 AM

You have a couple of errors in the zone file:
You have mixed ttl with class IN. You missed the trailing dot at mail.mydomain.com. Also move the MX record right after the NS records and make sure you leave at least a space before IN.
If you need the ttl then use this zone file:
Code:

$TTL 1D
@ SOA ns1.mynameser.net. dnsmaster.mydomain.com. (
2009102216
3H
1H
1H
1H )
 IN NS ns1.mynameser.net.
 IN NS ns2.mynameser.net.
 IN NS ns25.domaincontrol.com.
 IN NS ns26.domaincontrol.com.
 7200 IN  MX 10 mail.mydomain.com.
@ 7200 IN  A 80.227.124.13
mail.mydomain.com. 7200 IN  A 80.227.124.3
www 7200 IN  CNAME mydomain.com.


jonspeck 10-22-2009 09:24 AM

I agree with bathony response, may I offer the following zone file based on your material as an alternative.

Code:

$TTL 1D
@                IN          SOA          ns1.mynameser.net. dnsmaster.mydomain.com. (
                                        2009102217        ; Serial
                                        3H                ; Refresh
                                        1H                ; Retry
                                        1H                ; Expire
                                        1H                : Minimum TTL
                                        )

; Name Servers                               
                IN        NS        ns1.mynameser.net.
                IN        NS        ns2.mynameser.net.
                IN        NS        ns25.domaincontrol.com.
                IN        NS        ns26.domaincontrol.com.

; MX Record
                IN        MX 10        mail.mydomain.com.       

; Names
                IN        A        80.227.124.13                ; NULL record
mail                IN        A        80.227.124.3
www                IN        CNAME        mydomain.com.

In addition, here are a couple of links on DNS to assist you.

http://tldp.org/HOWTO/DNS-HOWTO-7.html
http://www.freebsd.org/doc/en/books/...twork-dns.html

Hope it helps.
Jon

jose_tk 10-23-2009 04:07 AM

Thanks bathory and jonspeck.
Your suggestions are perfect and neat.

With thanks
Jose


All times are GMT -5. The time now is 03:37 PM.