Re: [exim-dev] Bug? Exim rewrites domain in response to CNAM…

Top Page
Delete this message
Reply to this message
Author: Todd Lyons
Date:  
To: Graeme Fowler
CC: exim-dev@exim.org, Max Bowsher
Subject: Re: [exim-dev] Bug? Exim rewrites domain in response to CNAME, in contradiction to what is written in Chapter 31
On Mon, Sep 9, 2013 at 6:36 AM, Graeme Fowler <graeme@???> wrote:
> > The problem can be reproduced just using the "exim -bt" address testing
> > mode. Please run "exim -bt nonesuch@???". The
> > behaviour I have described results in Exim clearly showing the address
> > rewrite as follows:
> >
> > nonesuch@www.bcidahofoundation.com
> >    <-- nonesuch@???


I think it's a terminology issue. It's not exim "rewriting" the email
address. I believe a more technically correct phrase would be
"normalizing". A domain is not supposed to have an MX record set to a
CNAME. Behavior when such an event occurs is undefined. Some MTA's
merely fix the sending domain from the (invalid) CNAME to the
(standards compliant) A record. I *know* sendmail does this as I'm a
list owner on a mailing list machine which has this particular
configuration. Read on for exim behavior in this scenario:

> > You can see that the domain has incorrectly been changed to
> > @www.bcidahofoundation.com - the correct behaviour would not include any


Yes it has been changed, but no it's not incorrect (IMHO).

> The domain *has not* been incorrectly changed. This is expected behaviour - and it's all down to the DNS for that domain.
> graeme@boom ~]$ dig bcidahofoundation.org any

<snip>
> ;; QUESTION SECTION:
> ;bcidahofoundation.org.         IN      ANY
> ;; ANSWER SECTION:
> bcidahofoundation.org.  900     IN      CNAME   www.bcidahofoundation.com.

>
> ***Interesting bit here*** bcidahofoundation.org has no MX records, having only a CNAME at the zone apex which goes to... ta-da! The explicit hostname of www.bcidahofoundation.com.
> So nonesuch@??? gets internally rewritten in the envelope to deliver to nonesuch@www.bcidahofoundation.com.


...undefined behavior in this case means that the...

> If you had MX records in the .org zone then you wouldn't see this - although you can't have a CNAME and other data such as MX records at the zone apex, so you'd need to fiddle with your zone a bit to correct that.


...domain gets changed because of the lack of MX record. Graeme
pointed out a significant fact that I didn't piece together with all
of the rest. Setting MX records to the CNAME doesn't do this address
normalization, only if the domain name is a CNAME and there is not an
MX record for that domain name. Personally I think that behavior (in
both cases) should be configurable. Maybe it is and I just haven't
delved into it. I don't use my system on domains without MX records
so have never seen this behavior.

...Todd
--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine