Search Again:

Re: MX records and CNames?

From: Men & Mice Support
Date: Monday, April 3, 2000
Time: 10:31:48 pm

At 9:19 AM -0700 4/2/00, Warren Michelsen wrote:
>At 4:01 PM -0600 3/25/00, Jerry Pasker-Systems Admin. wrote:
>>
>>You're wrong... CNAMES in MX records break things quite badly. I've run
>>into it myself once and after trying to figure out why SOME (two acutally)
>>mail servers were not being able to send mail to my domain, I traced it to
>>me placing an MX record that pointed to a CNAME. It worked fine, until I
>>changed the name of my mailserver, and without thinking about it, made a
>>CNAME of the old server name point to the new name, without changing the MX
>>records. At that point the MX records that once pointed at A records,
>>were then aimed at CNAMES, and things started getting weird.
>
>However... Is there a problem with this arrangement?
>
>mail.MainDomain.com A xxx.xxx.xxx.xxx
>Maindomain.com MX 10 mail.MainDomain.com
>
>...
>anotherDomain.com C mail.MainDomain.com
>
>with no MX for anotherdomain.com?

[That should say CNAME in the second column, not C.]


That's a very good question, and it has a fairly complex answer.

First of all, let me explain why this _almost_ works:

A CNAME record creates a name and makes it an alias of another name.
The alias inherits all records associated with the original name.
This means that, if the original has an MX record, the alias gains
that MX record also. So to make this closer to working, you'd change
the CNAME to this:
anotherDomain.com. CNAME MainDomain.com.

However, unfortunately, the CNAME record given above is itself
against the rules. There are three restrictions that determine when
you can or can't use a CNAME record:

1) A CNAME record can't have the same name as any other record. (The
"name" field is the one on the left.)

2) A name that has a CNAME record can't have subdomains. So if
alias.domain has a CNAME record, sub.alias.domain is illegal for use
anywhere.

3) A name that has a CNAME record can't appear in any other record,
such as an MX or NS record. The exception is another CNAME record:
CNAME records can be chained, so that one.domain is an alias of
two.domain, which is in turn an alias of three.domain.

So in this case, since anotherDomain.com is delegated from com,
anotherDomain.com at the very least has two NS records and an SOA
record*. Thus a CNAME record violates the first of the above
restrictions, and may also violate the second and third, depending on
what other records are present in the domain file.

However, it does work if the CNAME record looks more like this:
pop.virtual.com. CNAME MainDomain.com.

so long as pop.virtual.com is not a delegated subdomain.
____________________________________________________________________
Chris Buxton cbuxton@menandmice.com
Men & Mice http://www.menandmice.com
Makers of: QuickDNS Pro



Messages In This Thread:



Return to Digital Point Solutions' Home Page