Mailing List Archive

Sender verify and Null MX (localhost.)
Hi,

I have a sender who sends from a domain with a null MX set to localhost. Exim returns a 451 loca temporary failure because the dnslookup router defers the mail (lowest mx points at localhost).
I would expect some form of 500-type error returning.
When I send a mail to that domain it also gets defered and frozen. Again I would expect some error.

What setting do I have to make in the dnslookup-router that a “MX 0 localhost.” fails and not defers?

Best

Niels
Re: Sender verify and Null MX (localhost.) [ In reply to ]
Hi.

On Tue, Nov 02, 2021 at 08:12:49PM +0100, Niels Kobschätzki via Exim-users wrote:
> What setting do I have to make in the dnslookup-router that a “MX 0 localhost.” fails and not defers?

Try ignore_target_hosts option.
--
Eugene Berdnikov

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Sender verify and Null MX (localhost.) [ In reply to ]
On 2 Nov 2021, at 20:39, Evgeniy Berdnikov via Exim-users wrote:

> Hi.
>
> On Tue, Nov 02, 2021 at 08:12:49PM +0100, Niels Kobschätzki via Exim-users wrote:
>> What setting do I have to make in the dnslookup-router that a “MX 0 localhost.” fails and not defers?
>
> Try ignore_target_hosts option.

That doesn’t work:

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
.ifdef SRS
dnssec_request_domains = *
.endif
mx_fail_domains = googlemail.de
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 : 10.0.0.0/8 : 172.16.0.0/12 : [::1/128]
no_more

leads to
(…)
>>> calling dnslookup router
>>> seitensammler.de in "*"? yes (matched "*")
>>> ::1 in "0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 : 10.0.0.0/8 : 172.16.0.0/12 : [::1/128]"? no (malformed IPv4 address or address mask)
>>> 127.0.0.1 in "0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 : 10.0.0.0/8 : 172.16.0.0/12 : [::1/128]"? yes (matched "127.0.0.0/8")
>>> localhost in hosts_treat_as_local? no (end of list)
>>> local host has lowest MX
LOG: lowest numbered MX record points to local host: seitensammler.de (while verifying <foobar@seitensammler.de> from host rs224.mailgun.us [209.61.151.224])
>>> dnslookup router: defer for sender@senderdomain.com
>>> message: lowest numbered MX record points to local host
>>> ----------- end verify ------------
>>> require: condition test deferred in ACL "acl_check_rcpt"
LOG: H=rs224.mailgun.us [209.61.151.224] sender verify defer for <sender@senderdomain.com>: lowest numbered MX record points to local host
451 Temporary local problem - please try later
LOG: H=rs224.mailgun.us [209.61.151.224] F=<foobar@seitensammler.de> temporarily rejected RCPT <rcpt@rcptdomain.com>: Could not complete sender verify

I also tried [::1] and ::1 — they also give an error of malformed IPv4 address or address mask; but it matches then 127.0.0.0/8
Still a 451 Temporary local problem

Niels
Re: Sender verify and Null MX (localhost.) [ In reply to ]
On 02/11/2021 20:29, Niels Kobschätzki via Exim-users wrote:
> ::1 in "0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 : 10.0.0.0/8 : 172.16.0.0/12 : [::1/128]"? no (malformed IPv4 address or address mask)

That test took an error.

[::1/128] is not a valid address-list element.
You either need ::::1 (i.e. no [] and double the list-separator),
or change the list-sep and use ::1

--
Cheers,
Jeremy

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Sender verify and Null MX (localhost.) [ In reply to ]
On 2 Nov 2021, at 22:56, Jeremy Harris via Exim-users wrote:

> On 02/11/2021 20:29, Niels Kobschätzki via Exim-users wrote:
>> ::1 in "0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 : 10.0.0.0/8 : 172.16.0.0/12 : [::1/128]"? no (malformed IPv4 address or address mask)
>
> That test took an error.
>
> [::1/128] is not a valid address-list element.
> You either need ::::1 (i.e. no [] and double the list-separator),
> or change the list-sep and use ::1

Thanks. That fixed this error. But I get still the 451:
>>> ::1 in "<; 0.0.0.0 ; 127.0.0.0/8 ; 192.168.0.0/16 ; 10.0.0.0/8 ; 172.16.0.0/12 ; ::1"? yes (matched "::1")
>>> 127.0.0.1 in "<; 0.0.0.0 ; 127.0.0.0/8 ; 192.168.0.0/16 ; 10.0.0.0/8 ; 172.16.0.0/12 ; ::1"? yes (matched "127.0.0.0/8")>>> localhost in hosts_treat_as_local? no (end of list)
>>> local host has lowest MX
LOG: lowest numbered MX record points to local host: senderdomain.com (while verifying <sender@senderdomain.com> from host rs224.mailgun.us [209.61.151.224])
>>> dnslookup router: defer for rcptdomain.com
>>> message: lowest numbered MX record points to local host
>>> ----------- end verify ------------
>>> require: condition test deferred in ACL "acl_check_rcpt"
LOG: H=rs224.mailgun.us [209.61.151.224] sender verify defer for <senderdomain.com>: lowest numbered MX record points to local host
451 Temporary local problem - please try later
LOG: H=rs224.mailgun.us [209.61.151.224] F=<senderdomain.com> temporarily rejected RCPT <rcpt@rcptdomain.com>: Could not complete sender verify

The MX-record of the sender-domain looks like this:
senderdomain.com. 300 IN MX 0 localhost.

The dnslookup-router again:

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
.ifdef SRS
dnssec_request_domains = *
.endif
mx_fail_domains = googlemail.de
ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; 192.168.0.0/16 ; 10.0.0.0/8 ; 172.16.0.0/12 ; ::1
no_more

Niels
Re: Sender verify and Null MX (localhost.) [ In reply to ]
Hi,

D?a 3. 11. o 4:30 Niels Kobschätzki via Exim-users napísal(a):
> LOG: lowest numbered MX record points to local host: senderdomain.com (while verifying <sender@senderdomain.com> from host rs224.mailgun.us [209.61.151.224])

have you tried to play with "self", the generic router option?

--
Slavko

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: Sender verify and Null MX (localhost.) [ In reply to ]
On 3 Nov 2021, at 9:31, Slavko via Exim-users wrote:

> Hi,
>
> D?a 3. 11. o 4:30 Niels Kobschätzki via Exim-users napísal(a):
>> LOG: lowest numbered MX record points to local host: senderdomain.com (while verifying <sender@senderdomain.com> from host rs224.mailgun.us [209.61.151.224])
>
> have you tried to play with "self", the generic router option?
Thanks.

self = pass

seems to solve the problem (at least with exim -bh it looks good)

Niels