4

I have ubuntu machine with bind9 and tinydns installed on, as well as dnscache. And I'm now trying to add a MX record to bind9 zone file. Yet nothing seemse to have any effect. This is the data file for tinydns

.tinyz:127.0.0.2:a:259200
.10.in-addr.arpa:127.0.0.2:a:259200
=tiger.tinyz:10.20.40.90:86400
&bindz.tinyz:10.11.12.13:a:259200
&11.10.in-addr.arpa::a.ns.bindz.tinyz:259200

This is the zone file for bind9

$TTL 172800
$ORIGIN bindz.tinyz.

@   IN  SOA a.ns.bindz.tinyz.   hostmaster.tinyz.   (

            2009012701  ; Serial
            10800       ; Refresh
            3600        ; Retry
            3600000     ; Expire
            86400 )     ; Negative TTL


        NS  a.ns

a.ns        A   10.11.12.13

www     A   10.11.100.200
        TXT "Administrator: Eve"


; This is a comment, please note the ";" which denotes a comment.

I now try to add the mx record so after the file look like this.

$TTL 172800
$ORIGIN bindz.tinyz.

@   IN  SOA a.ns.bindz.tinyz.   hostmaster.tinyz.   (

            2009012701  ; Serial
            10800       ; Refresh
            3600        ; Retry
            3600000     ; Expire
            86400 )     ; Negative TTL


        NS  a.ns

a.ns        A   10.11.12.13

www     A   10.11.100.200
        TXT "Administrator: Eve"

    IN      MX     10   mail.bindz.tinyz.


; This is a comment, please note the ";" which denotes a comment.

After this i ran

# named-checkconf
# /etc/init.d/bind9 restart
# svc -t /etc/service/dnscache

Just to be sure that the cache is not in the way. Then i check if the mx record is in place.

# dig mx bindz.tinyz

; <<>> DiG 9.9.3-rpz2+rl.13214.22-P2-Ubuntu-1:9.9.3.dfsg.P2-4ubuntu1.1 <<>> mx bindz.tinyz
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 18073
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;bindz.tinyz.           IN  MX

;; AUTHORITY SECTION:
.           9434    IN  SOA a.root-servers.net. nstld.verisign-grs.com. 2014051500 1800 900 604800 86400

;; Query time: 12 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu May 15 17:05:51 CEST 2014
;; MSG SIZE  rcvd: 115

What I'm i doing wrong in the zone file file?

Icy Creature
  • 223
  • 2
  • 5
  • 11

1 Answers1

5

You haven't added a A-record for mail.bindz.tinyz used in the MX record.

mail IN A <IP ADDRESS>

To do a sanity check of a zone before loading it you'd want to use

named-checkzone

instead of named-checkconf.

Edit:

When testing with the dig command make sure you point at the IP address/host that you want to query:

dig @<your-name-server ip or hostname> bindz.tinyz
mikejoh
  • 166
  • 4