Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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, 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

My understanding is that setting up a CNAME record will cause all record lookups for to use the records defined on 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:


MX (mx details)

My assumption is that e-mails sent to would use the MX records from 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 What happens when you dig -t MX – Alex Forbes Feb 8 '13 at 17:28
up vote 5 down vote accepted

Check out

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.

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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.