Reverse DNS and mail
Mike DiChiappari
mdichiappari at domanisoft.com
Wed Jan 7 12:40:15 UTC 2004
I am thinking about (finally) setting up reverse DNS. Occassionally someone
reports the error " (reason: 501 Domain must resolve)" when trying to send
mail to us. I simply want our mail servers, which serves mail for several
domains, to work properly with reverse DNS.
How does one setup reverse dns when a server supports multiple (virtual)
hosts?
For example, our server hosts foo.com and bar.com. The /etc/named.conf
contains this:
zone "foo.com" IN {
type master;
file "foo.com.zone";
allow-update { none; };
};
zone "bar.com" IN {
type master;
file "bar.com.zone";
allow-update { none; };
};
The typical zone file looks like this:
$TTL 86400
bar.com. IN SOA dns.foo.com. me.foo.com (
4 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
NS dns.foo.com.
A w.x.y.z
MX 5 mail
localhost IN A 127.0.0.1
mail A w.x.y.z
dns A w.x.y.z
www IN A a.b.c.d
fred IN A m.n.o.p
harry IN A m.n.o.p
NOTE: foo.com and bar.com on the same IP. Also the IP addresses for mail
(w.x.y.z) are the same for foo.com and bar.com. The web sites for both are
on the same web server (virtually hosted).
The question is how do I add reverse lookup to named.conf?
I would want to add something like this:
zone "w.x.w-in-addr.arpa" IN {
type master;
file ####.com.rr.zone
allow-update { none };
};
What goes at ####? Do I put foo or bar? Or do I create two of these
sections, each with the exact same first line (since they both share the
same IP address)?
Another question: In the zone files for the reversed zones, is it okay to
have address listed more than once by a PTR when a machine is known by more
than one name (see fred and harry above)? For example,
bar.com. IN SOA dns.foo.com. me.foo.com (
4 ; serial
28800 ; refresh
7200 ; retry
604800 ; expire
86400 ; ttl
)
p IN PTR fred.bar.com ; NOTE: This line
and the next both reference "p"
p IN PTR harry.bar.com
Thanks,
Mike
More information about the bind-users
mailing list