Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, my server's primary hostname is internet.practiceofcode.com. This is defined as an A record, and the reverse lookup has been correctly configured:

 # host -t a internet.practiceofcode.com
 internet.practiceofcode.com has address 118.127.56.29

I have assigned this hostname as the MX value for a number of other domains:

 # host -t mx radic.com.au
 radic.com.au mail is handled by 10 internet.practiceofcode.com.

The zone file for that domain is as follows:

 $ORIGIN radic.com.au.
 $TTL 3600  ; 1 hour
 radic.com.au.  IN SOA  internet.practiceofcode.com. hostmaster.practiceofcode.com. (
                2011101002
                3600       ; refresh
                3600       ; retry
                604800     ; expire
                3600       ; minimum
                )
                NS  internet.practiceofcode.com.
                NS  backup.practiceofcode.com.
                MX  10 internet.practiceofcode.com.
                MX  50 backup.practiceofcode.com.
                TXT "v=spf1 a mx ?all"

However, when using named-checkzone to validate it, it (seemingly erroneously) tells me that internet.practiceofcode.com. is a CNAME:

 # named-checkzone radic.com.au. radic.com.au.zone
 zone radic.com.au/IN: radic.com.au/MX 'internet.practiceofcode.com' (out of zone) is a CNAME 'internet.practiceofcode.com.' (illegal)
 zone radic.com.au/IN: loaded serial 2011101002

I'm running Debian Squeeze:

 # cat /etc/debian_version 
 6.0.2

And Bind 9.7.3:

 # named-checkzone -v
 9.7.3

Zone file for practiceofcode.com.:

 $ORIGIN practiceofcode.com.
 $TTL 3600  ; 1 hour
 practiceofcode.com.    IN SOA  internet.practiceofcode.com. hostmaster.practiceofcode.com. (
                2011101002
                3600       ; refresh
                3600       ; retry
                604800     ; expire
                3600       ; minimum
                )
                NS  internet.practiceofcode.com.
                NS  backup.practiceofcode.com.
                MX  10 internet.practiceofcode.com.
                MX  50 backup.practiceofcode.com.
                A   72.32.231.8
                TXT "v=spf1 a mx -all"
 www                CNAME   practiceofcode.com.
 internet           A   118.127.56.29
share|improve this question
    
What is in the zone file for practiceofcode.com? – John Gardeniers Oct 12 '11 at 11:07
    
Were you ever able to resolve this? I'm seeing the same issue on some customer data here. Running BIND 9.9.7 and the named-checkzone is fasley reporting some MX record RDATA as a CNAME when it's, in fact, an A record in another zone. Curious if you were able to find the cause. – Matt Fura Dec 29 '15 at 20:20
1  
@Matt checkzone has no awareness of other zones in named.conf and performs its validation of out of zone data against the locally configured resolver. If it's complaining about a CNAME, that's because the server in /etc/resolv.conf is in fact finding a CNAME. – Andrew B Dec 29 '15 at 21:42
    
I would have thought the above running of host -t a internet.practiceofcode.com would have proved otherwise. In the above case, the only resolver in resolve.conf was 127.0.0.1. – jaydisc Jan 9 at 22:11
    
@MattFura It seemed to resolve itself over time. I ignored it as I was confident in the accuracy of my records and they were validated by other verification tools. – jaydisc Jan 9 at 22:13

There is missing a dot at the end of 'internet.practiceofcode.com' in the named-checkzone. Maybe there is a dot missing in your 'practiceofcode.com' zone ? Other idea : I put the '$ORIGIN domain' after the SOA definition, and I put a '$ORIGIN .' before SOA. Maybe it change something...

share|improve this answer
    
Hi Dom, the missing period seems to just be how named-checkzone is reporting it. It is indeed there as you can see in the zone file. I tried the shuffling of the $ORIGIN as you mentioned. I have seen that technique before, but the error is unchanged. – jaydisc Oct 12 '11 at 22:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.