Will an MX record “follow” a CNAME record

cname-recorddomain-name-systemmx-record

I have a situation I'm trying to work through that I'm not entirely sure how to solve.

Here's the situation:

I have a domain, let's say sub.otherdomain.com, that I want to set up e-mail addresses on, and additionally set up an A record on. I don't own this domain, but the owners of the domain have set up a CNAME record to point to one of my domains (let's say customer.mydomain.com)

My understanding is that setting up a CNAME record will cause all record lookups for sub.otherdomain.com to use the records defined on customer.mydomain.com. This seems to work fine for the A record I have set up, but the MX records don't seem to be passing through the CNAME correctly.

In summary, the following records exist:

sub.otherdomain.com

CNAME  customer.mydomain.com

customer.mydomain.com

A xxx.xxx.xxx.xxx
MX (mx details)

My assumption is that e-mails sent to xxx@sub.otherdomain.com would use the MX records from customer.mydomain.com. Is this not the case?

Best Answer

Check out http://www.ietf.org/rfc/rfc1123.txt

The domain names that a Sender-SMTP sends in MAIL and RCPT commands MUST have been "canonicalized," i.e., they must be fully-qualified principal names or domain literals, not nicknames or domain abbreviations. A canonicalized name either identifies a host directly or is an MX name; it cannot be a CNAME.