noob question multiple db files, soa's and mx records.

Kevin Darcy kcd at daimlerchrysler.com
Tue Oct 29 00:00:07 UTC 2002


Joe Oaks wrote:

> Hello guru's
>
> I have been running bind for a little over 2 years now but don't fully
> understand
> it and how to configure it very well.
>
> I started out with a single domain name, trells.com running mail, ftp, http,
> the
> standard stuff, no big deal. Now however we have multiple domains (mainly
> web)
> this too was no big deal. However this has grown to a need of having
> multiple
> mx records, and I'm unsure how to update this.
>
> Each domain has its own db file and mx record, and this part was the part
> that was
> messed up and I'm trying to fix. We run qmail as our mail server and for a
> while
> this was fine one instance controlling all domains. I'm in the process of
> setting
> up a separate instance of qmail for each domain, and for that I need to get
> my
> dns setup correctly.
>
> My question to you guys is this,
> 1) tc1.trells.com has multiple ip's, and I want to bind mail.trells.com to
>    207.168.116.66 and mail.bazalar.com to say imp 207.168.116.67, but I'm
> lost
>    in how to do this in the db files. trells and bazalar each have there own
>    db file.
>
> Once I can get an understanding of how to do this I can then setup the mx
> records.
> Would I make the db.trells.com mx line like
> a) @               IN      MX      10      mail.trells.com.
> or
> b) 207.168.116.66       IN      MX              10      mail.trells.com.
>
> and then the db.bazalar.com mx line similar, using the actual ip instead of
> the @?

No, the only thing that goes on the lefthand side of the resource record is
something that belongs in the zone itself, so unless you want a name like
"207.168.116.66.trells.com", option (b) is out of the question.

If you want to use the name "mail.trells.com" in an MX record, then you need to
associate that name with an IP address via an A record, just as you would for
an FTP server, an HTTP server, or any other kind of server. So you'd have
something like

mail    in    a    207.168.116.66

in the trells.com zonefile. As long as that A record exists, you can point MX
records to it.

So, what would the MX record look like? It depends on what the name of the MX
record is. If you want the name of the MX record to be the name of the zone,
then option (a) (with "@" on the lefthand side) should work. If in the future
you want subdomains of trells.com to be mailable, you'd add those MX records
too, e.g.:

foo    in    mx    0    mail2

would allow user at foo.trells.com to be mailable, assuming there was a working
mail server at whatever address "mail2.trells.com" resolved to.

> also on a side note, in the soa second line i.e.
> trells.com.     IN      SOA     tc1.trells.com. mail.trells.com. (
> for the other domains, i.e. bazalar.com what would I put here, since its the
> same
> machine?
> bazalar.com.     IN      SOA     tc1.bazalar.com. mail.bazalar.com. (

There's no rule that says the contents of those fields, i.e. the "origin" of
the zone, and the mail address for the zone administrator, have to be in same
domain as that of the SOA (see for example, the SOA record for
gnarlycoolgroovy.com, which has daimlerchrysler.com names for both of those
fields). So go ahead and use the same information for those two fields in both
SOA records.


- Kevin





More information about the bind-users mailing list