Bug is still present in 4.99.5 and 4.100 .
I have seen the same problem with a live domain I cannot influence
(send.stellenmarktdeutschland.com is a CNAME to eu1.bounce.bird.com, which is a
CNAME to eu.sparkpostmail.com).
exim is unable to send mail to send.stellenmarktdeutschland.com due to domain
change when encoundtering multiple CNAMEs (mails to
[email protected] will be send to
[email protected] , which is invalid).
This is in conflict with the documentation saying exim will not rewrite based
on CNAMEs.
Looking at the source I found function dns_lookup in dns.c ; lines 1075-1083
there's a loop:
for (dns_record * rr = dns_next_rr(dnsa, &dnss, RESET_ANSWERS);
rr; rr = dns_next_rr(dnsa, &dnss, RESET_NEXT))
if (rr->type == type)
{
if (type_rr.data == NULL) type_rr = *rr;
if (cname_rr.data != NULL) break;
}
else if (rr->type == T_CNAME)
cname_rr = *rr;
cname_rr will hold the last CNAME encountered, which is then used to replace
the fully qualified name.
It would probably work as intended if it would use the first CNAME... maybe
changing else if (rr->type == T_CNAME) to else if (rr->type == T_CNAME &&
cname_rr.data == NULL) could fix that bug.
---
View it on Exim Forgejo (
https://code.exim.org/exim/exim/issues/1383#issuecomment-240172 ) or reply to
this email directly.
--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## [email protected]
## Exim details at https://www.exim.org/
## Please use the Wiki with this list - https://code.exim.org/exim/wiki/wiki