Take the 2-minute tour ×

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:


CNAME  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?

share|improve this question
I think your initial assumption is correct - the mail server should follow the CNAME pointer and retrieve the records for customer.mydomain.com. What happens when you dig -t MX sub.otherdomain.com? –  Alex Forbes Feb 8 '13 at 17:28
add comment

2 Answers

up vote 5 down vote accepted

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


share|improve this answer
So, if I'm understanding this correctly, it's impossible to set up MX records on a domain that has CNAMEs defined on it, even if the MX records are defined "further down the chain"? –  Ryan Brunner Feb 8 '13 at 16:03
RFC 5321 disagrees with this. RFC 1123 references RFC 821 for SMTP, which is long obsolete. –  mgorven Feb 8 '13 at 19:04
add comment

Yes, this should work. From RFC 5321:

Only resolvable, fully-qualified domain names (FQDNs) are permitted when domain names are used in SMTP. In other words, names that can be resolved to MX RRs or address (i.e., A or AAAA) RRs (as discussed in Section 5) are permitted, as are CNAME RRs whose targets can be resolved, in turn, to MX or address RRs.


The lookup first attempts to locate an MX record associated with the name. If a CNAME record is found, the resulting name is processed as if it were the initial name.

share|improve this answer
add comment

Your Answer


