Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This used to work but it has been a while. I have a number of zone files and all of these domains use the same mail server as well as web server. I am trying to use an include file to load these common services records like www, or mail or pop etc. So, I have the following zone file, for example:

   $ORIGIN .
    $TTL 86400      ; 1 day
    domain.com               IN SOA  ns.domain.net. root.domain.net. (
                                2008021701 ; serial
                                10800      ; refresh (3 hours)
                                3600       ; retry (1 hour)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
                        NS      ns.domain.net.
                        NS      ns2.domain.net.
                        A       66.207.212.60
                        MX      10 rosewood.domain.net.
                        MX      20 ebony.domain.net.
                        TXT     "v=spf1 mx:smtp.domain.com include:domain.com ~all"
     $INCLUDE "masters/domain-common-services.inc";

The $INCLUDE file has the following content:

www     IN A    xxx.xxx.180.162
mail    IN A    xx.xxx.212.58
pop     IN A    xx.xx.212.58

The configtest is saying"

masters/domain-common-services.inc:1: ignoring out-of-zone data (www)
masters/domain-common-services.inc:2: ignoring out-of-zone data (mail)
masters/domain-common-services.inc:3: ignoring out-of-zone data (pop)

Do I need some sort of an $ORIGIN statement in the include file as well?

Cheers

Dave

share|improve this question

1 Answer 1

It's the "$ORIGIN ." that's messing you up. That's telling bind that everything needs to be fully qualified.

Take out the $ORIGIN line, and where you have "domain.com" for the SOA record, put an @.

$TTL 86400      ; 1 day
@              IN SOA  ns.domain.net. root.domain.net. (
                            2008021701 ; serial
                            10800      ; refresh (3 hours)
                            3600       ; retry (1 hour)
                            604800     ; expire (1 week)
                            86400      ; minimum (1 day)
                            )
                    NS      ns.domain.net.
                    NS      ns2.domain.net.
                    A       66.207.212.60
                    MX      10 rosewood.domain.net.
                    MX      20 ebony.domain.net.
                    TXT     "v=spf1 mx:smtp.domain.com include:domain.com ~all"
 $INCLUDE "masters/domain-common-services.inc";
share|improve this answer
    
Ahh yes .. I thought it was something like that. Just could not remember it. Thanks for your help. Cheers, Dave –  Dave Jul 25 '10 at 6:08

Your Answer

 
discard

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