Configurando o registro mx no bind9

Configurando o registro mx no bind9

Eu tenho uma máquina Ubuntu com bind9 e tinydns instalados, bem como dnscache. E agora estou tentando adicionar um registro MX ao arquivo de zona bind9. No entanto, nada parece ter qualquer efeito. Este é o arquivo de dados para 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

Este é o arquivo de zona para 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.

Agora tento adicionar o registro mx para que o arquivo fique assim.

$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.

Depois disso eu corri

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

Só para ter certeza de que o cache não está atrapalhando. Então verifico se o registro mx está em vigor.

# 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

O que estou fazendo de errado no arquivo de zona?

Responder1

Você não adicionou um registro A para mail.bindz.tinyz usado no registro MX.

mail IN A <IP ADDRESS>

Para fazer uma verificação de integridade de uma zona antes de carregá-la, você gostaria de usar

named-checkzone

em vez de checkconf nomeado.

Editar:

Ao testar com oescavaçãocomando, certifique-se de apontar para o endereço IP/host que deseja consultar:

dig @<your-name-server ip or hostname> bindz.tinyz

informação relacionada