[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] DNS HOWTO - MX Record www.domain.com - Why?



On Sun, 26 Aug 2001, cbtrussell wrote:

> Hi again,
> 
> My second DNS question of the day (*sigh*)
> 
> The general rule is the Mail Server (MX) record must point to the Address
> (A) Record of the Virtual Site where you want to receive email."
> {end quote}
> 
> SO - which is it? Why this funny mail server = www.domain.com business?
> 
> If I set up
> 
> A record for mydomain.com > x.x.x.x
> A record for www.mydomain.com > x.x.x.x
> MX record for mail.mydomain.com > x.x.x.x
> (no PTR because it's a name based site)
> 
> Would this NOT work?

no, because mail. has no ip address (A) , there are 2 things you need to
accomplish, you must point the MX to a >domain name< that resolves to an
IP address that is on the server, it doesn't incidently really have to be
the domain name recieving mail, but it's a nice idea...

The second thing is you have to prevent mail loops, the raq's do a funky
thing when they handle mail aliases, they map domain.com to www.domain.com
(or whatever subdomain) so you don't want the MX to point to a domain name
that's going to get looped to www.domain because it will go around in
circles, pointing it at mail.domain.com and making mail.domain.com resolve
to the same IP address as domain.com will work for example....

eg:

 A record for mydomain.com > x.x.x.x   (for the IP -> domain for web)
 A record for www.mydomain.com > x.x.x.x (for web site)
 A record for mail.domain.com > x.x.x.x  (for connecting to mail server)
 MX record for mydomain.com > mail.mydomain.com (says use mail for
mail)

eg: all mail for *.mydomain.com goes to whatever mail.mydomain.com
resolves to...

The last is a touch strange, but you are trying to do something
unnecessary by
having mail. a seperate name that doesn't actually do anything else ;)

The one thing you don't want to do is MX mydomain.com -> mydomain.com, as
www.mydomain.com is part of mydomain.com and will see the MX record, and
you will create a loop...(due to internal rewriting rules that map
mydomain.com back to www.mydomain.com , nb: the raq4 rewrites somewhat
differently due to better subdomain support, but the general idea is the
same)

It's also valid for mail.mydomain.com to resolve to the main IP address of
the machine for all virtual sites, this has a small advantage in that your
mail server identifies itself better....(eg, if you have working reverse
dns, the mail server tells people a domain name that may be better fr you
as a abuse contact than a virtual domain, it all depends how much you want
to isolate yourself from your customers domain's

gsh