[exim-dev] [Bug 1383] New: Incorrectly rewrites domain of ad…

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Max Bowsher
Data:  
Para: exim-dev
Temas novos: [exim-dev] [Bug 1383] Incorrectly rewrites domain of addresses when resolving through a chain of multiple CNAMEs, [exim-dev] [Bug 1383] Incorrectly rewrites domain of addresses when resolving through a chain of multiple CNAMEs
Asunto: [exim-dev] [Bug 1383] New: Incorrectly rewrites domain of addresses when resolving through a chain of multiple CNAMEs
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1383
           Summary: Incorrectly rewrites domain of addresses when resolving
                    through a chain of multiple CNAMEs
           Product: Exim
           Version: 4.80.1
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Address Rewriting
        AssignedTo: nigel@???
        ReportedBy: _@maxb.eu
                CC: exim-dev@???



I have discovered a bug in which Exim rewrites the domain of an address as it
follows a chain of CNAMEs. This directly contradicts a paragraph from the
'Address rewriting' chapter of the documentation:

--------------------------------------------------------------------------------
One situation in which Exim does not automatically rewrite a domain is when it
is
the name of a CNAME record in the DNS. The older RFCs suggest that such a
domain
should be rewritten using the “canonical” name, and some MTAs do this. The
new
RFCs do not contain this suggestion.
--------------------------------------------------------------------------------

However, this erroneous behaviour only seems to occur when there is a chain of
multiple CNAMEs leading to the final domain.

I have set up a chain of CNAMEs for testing under my personal domain:
cname3.maxb.eu --> cname2.maxb.eu --> cname1.maxb.eu --> j.maxb.eu

The bug is readily reproduced just using address testing "-bt" mode - compare
the two results below:

$ exim -bt nonesuch@???
nonesuch@???
router = dnslookup, transport = smtp
host j.maxb.eu [80.68.92.224]

$ exim -bt nonesuch@???
nonesuch@???
    <-- nonesuch@???
  router = dnslookup, transport = smtp
  host j.maxb.eu [80.68.92.224] 


Observe that in the second, the address has been rewritten, not to the final
target of the CNAMEs, but to the final CNAME before reaching the real canonical
name.

The interesting chain of function calls for this bug appears to start in
src/routers/dnslookup.c where it calls host_find_bydns(...) - there is an
output parameter fully_qualified_name which appears to be being updated to
point to the final CNAME in the chain even though there is a counter in the
dns_lookup(...) function which is used, which seems to explicitly try to NOT
update fully_qualified_name based on CNAME following.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email