Bug#992421: dnslookup_relay_to_domains probably needs ignore_target_hosts

Andreas Metzler ametzler at bebt.de
Tue Aug 24 18:47:46 BST 2021


On 2021-08-18 Marc Haber <mh+debian-packages at zugschlus.de> wrote:
> Package: exim4-config
> Version: 4.94.2-2~zg100+3
> Severity: normal

> Hi,

> I am not sure whether this is an actual bug. I have observed this
> behaviod on an exim that is backup MX for domain.example. The MX records
> are like:
> domain.example mail is handled by 0 mx.domain.example.
> domain.example mail is handled by 10 myexim.otherdomain.example.

> Both hosts have both IPv4 and IPv6 addresses in DNS; the local resolver
> on myexim.otherdomain.example resolves its own host name to 127.0.1.1 by
> virtue of the normal Debian /etc/hosts file.

> [36/5023]mh at q:~ $ sudo exim -bt lists at domain.example
> R: domain_literal for lists at domain.example
> R: dnslookup_relay_to_domains for lists at domain.example
> lists at domain.example
>   router = dnslookup_relay_to_domains, transport = remote_smtp
>   host mx.domain.example [IPv6 address] MX=0
>   host mx.domain.example [IPv4 address]                         MX=0
>   host myexim.otherdomain.example      [127.0.1.1]                             MX=10
> [37/5024]mh at q:~ $

> If mx.domain.example refuses mail, the local exim happily delivers to itself, causing a loop:
> 2021-08-18 08:06:15 1mGEiM-00089y-Vx <= linux-staging+bounces-5545-lists=domain.example at lists.linux.dev H=localhost (myexim.otherdomin.example) [127.0.0.1] P=esmtps X=TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256 CV=no K S=14699 id=<snip>
[...]
> Or is exim supposed to never relay to itself automatically? If that is the
> case, more debugging is needed to find out why this happens here. Advice
> appreciated.

Hello Marc,

https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_dnslookup_router.html
says:
| Unless they have the highest priority (lowest MX value), MX records that
| point to the local host, or to any host name that matches
| hosts_treat_as_local, are discarded, together with any other MX records
| of equal or lower priority.
| 
| If the host pointed to by the highest priority MX record, or looked up
| as an address record, is the local host, or matches
| hosts_treat_as_local, what happens is controlled by the generic self
| option.

(and self=  defaults to "freeze")

According to chapter 3, »8. Recognizing the local host« exim uses the
local_interfaces setting (unless it is 0.0.0.0 or ::0) to recognize the
local host. - Are you setting it?

cu Andreas

-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



More information about the Pkg-exim4-maintainers mailing list