MX and A Records/CNAMES

David Nolan vitroth+ at cmu.edu
Thu Apr 20 16:05:48 UTC 2006



--On Thursday, April 20, 2006 08:29:21 -0700 "Koehler, Charles" 
<CWK at its.ucsf.edu> wrote:

> I need assistance to s
> The server group wants to merge the web services to from these three
> hosts to a new server, mainwebhost.ucsf.edu.
> mainwebhost.ucsf.edu. IN A 192.5.5.50
>
> I did the following:
> 1) Remove A Record (object) for host1.ucsf.edu
> 2) Add CNAME of host1.ucsf.edu to mainwebhost.ucsf.edu
> 3) Attempted to add MX record to MX host1.ucsf.edu to host1.ucsf.edu but
> encountered an error stating that the mail host did not exist.
>
> QIP requires that there be an A Record rather than CNAME for the MX but
> can I do an exception as follows? And if not what specific RFC can I
> reference?
>
> mainwebhost.ucsf.edu. IN A       192.5.5.50
> host1 at ucsf.edu.       IN CNAME   mainwebhost.ucsf.edu.
> host2 at ucsf.edu.       IN CNAME   mainwebhost.ucsf.edu.
> host3 at ucsf.edu.       IN CNAME   mainwebhost.ucsf.edu.
> host1 at ucsf.edu.       IN MX  0   localmailhost at ucsf.edu.
> host1 at ucsf.edu.       IN MX  0   remotemailhost at outsidemail.net.
> host2 at ucsf.edu.       IN MX  0   localmailhost at ucsf.edu.
> host2 at ucsf.edu.       IN MX  0   remotemailhost at outsidemail.net.
> host3 at ucsf.edu.       IN MX  0   localmailhost at ucsf.edu.
> host3 at ucsf.edu.       IN MX  0   remotemailhost at outsidemail.net.
>

If a CNAME exists for a name, then no other records can exist for that 
name. i.e. once you have:
host1 at ucsf.edu.       IN CNAME   mainwebhost.ucsf.edu.
you CANNOT have:
host1 at ucsf.edu.       IN MX  0   localmailhost at ucsf.edu.

The cname for host1 means *ALL* lookups for host1 should look for records 
on mainwebhost.  Thus your MX record should be:
mainwebhost.ucsf.edu  IN MX 0    localmailhost at ucsf.edu.
mainwebhost.ucsf.edu  IN MX 0    remotemailhost at outsidemail.net.

See section 2.4 of RFC 1912.

-David Nolan
 Network Software Designer
 Computing Services
 Carnegie Mellon University



More information about the bind-users mailing list