Re: [Exim] CNAMEs and MXes.

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Adam D. Barratt
Datum:  
To: exim-users
Betreff: Re: [Exim] CNAMEs and MXes.
On Thu, 2004-04-15 at 20:14, Thomas Fini Hansen wrote:
[...]
> The mail was some spam, adressed to a message-id, on my home servers
> hostname, but I wouldn't think that it should end up at the MX'es for
> the domain.
>
> % host -t mx mydomain.dk
> homeserver.mydomain.dk  CNAME   mydomain.dk
> mydomain.dk             MX      10 mx.workdomain.dk
> ...

>
> So, if there's no MXes for a CNAME, it takes the ones from the A
> record it's pointing to, instead of trying host delivery as I would
> have expected.


You appear to be misunderstanding what a CNAME RR in a DNS record
represents. Specifically, it is *not* a `pointer to an A RR'.

(Also, as the latter portion of the quote below explicitly states, there
should *never* be `MXs for a CNAME' - the whole point of the CNAME is
that it redirects the query).

>From RFC1034 (apologies for the length of the quote, I've tried to only

include the relevant sections):

<quote>
3.6. Resource Records
[...]
type            which is an encoded 16 bit value that specifies the type
                of the resource in this resource record.  Types refer to
                abstract resources.


                This memo uses the following types:


                A               a host address


                CNAME           identifies the canonical name of an
                                alias
[...]
RDATA           which is the type and sometimes class dependent data
                which describes the resource:


                A               For the IN class, a 32 bit IP address
[...]
                CNAME           a domain name.
[...]
3.6.2. Aliases and canonical names
[...]
The domain system provides such a feature using the canonical name
(CNAME) RR.  A CNAME RR identifies its owner name as an alias, and
specifies the corresponding canonical name in the RDATA section of the
RR.  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.
[...]
CNAME RRs cause special action in DNS software.  When a name server
fails to find a desired RR in the resource set associated with the
domain name, it checks to see if the resource set consists of a CNAME
record with a matching class.  If so, the name server includes the CNAME
record in the response and restarts the query at the domain name
specified in the data field of the CNAME record.  The one exception to
this rule is that queries which match the CNAME type are not restarted.
</quote>


hth

Adam