Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Given something like this:

xxx.net.            CNAME    surrogate-xxx.net.
www.xxx.net.        CNAME    surrogate-xxx.net.
mail.xxx.net.       A        1.2.3.4
xxx.net.            MX       mail.xxx.net.

surrogate-xxx.net.  A        4.3.2.1 

Should mail for xxx.net go to 1.2.3.4, as directed by the MX record, or to 4.3.2.1, as directed by the A record to which the CNAME points.

share|improve this question
    
You probably have messed up the dots in your example - it looks like it should be xxx.net. (note the trailing dot). –  the-wabbit Dec 16 '11 at 14:57
1  
Most dns servers will not load this zone, as 'xxx.net' has "CNAME and other data' - namely the SOA, so it most likey won't get served. –  Aaron Dec 16 '11 at 17:11

2 Answers 2

Actually the zone as noted here is considered a bad practice. Defining a CNAME for the label xxx.net just "remaps" all RRs of xxx.net. to surrogate-xxx.net. including the MX record. Defining the MX RR for xxx.net. is asking for trouble. RFC-1034 has a clear statement on this topic:

If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different. This rule also insures that a cached CNAME can be used without checking with an authoritative server for other RR types.

Further reading here.

share|improve this answer

Mail will flow to mail.xxx.net in that scenario.

Mail will flow to whatever the MX record(s) points to.

Now, if your MX record points to mail.xxx.net and mail.xxx.net points via CNAME to surrogate-mail.xxx.net, mail will flow to surrogate-mail.xxx.net. Your MX record points to an endpoint - how you define that endpoint - A record, CNAME, etc. is up to you.

share|improve this answer

Your Answer

 
discard

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.