[Exim] Bug? Failure to match host in a hostlist

Pàgina inicial
Delete this message
Reply to this message
Autor: Andreas Metzler
Data:  
A: exim-users
CC: Jonas Meurer
Assumpte: [Exim] Bug? Failure to match host in a hostlist
Hello,
With this setup about every 4th delivery fails, because exim skips
authentication.

DCsmarthost = mail.kidns.de
...
smarthost:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
route_list = * DCsmarthost
host_find_failed = defer
same_domain_copy_routing = yes
no_more

remote_smtp:
debug_print = "T: remote_smtp for $local_part@$domain"
driver = smtp
hosts_require_auth = DCsmarthost
hosts_require_tls = DCsmarthost

In case of failure exim does not _try_ to authenticate because it does
not match the hostname in hosts_require_auth.

DNS is a little bit strange (mail.kidns.de has 4 IPs) and
reverse-lookups are missing, the log for AUTH failure shows:
---------------
DNS lookup of mail.kidns.de (A) succeeded
fully qualified name = mail.kidns.de
mail.kidns.de 62.75.128.98 mx=-1 sort=-483
mail.kidns.de 62.75.128.99 mx=-1 sort=-410
queued for remote_smtp transport: local_part = jonas
[...]
>>>>>>>>>>>>>>>> Remote deliveries >>>>>>>>>>>>>>>>

[...]
using PIPELINING
gethostbyname2(af=inet6) returned 4 (NO_DATA)
gethostbyname2 looked up these IP addresses:
name=mail.kidns.de address=62.75.128.97
62.75.128.98 in hosts_require_auth? no (end of list)
---------------

while success looks like this:
---------------------------
DNS lookup of mail.kidns.de (A) succeeded
fully qualified name = mail.kidns.de
mail.kidns.de 62.75.128.97 mx=-1 sort=-435
queued for remote_smtp transport: local_part = jonas
[...]
>>>>>>>>>>>>>>>> Remote deliveries >>>>>>>>>>>>>>>>

[...]
using PIPELINING
gethostbyname2(af=inet6) returned 4 (NO_DATA)
gethostbyname2 looked up these IP addresses:
name=mail.kidns.de address=62.75.128.97
62.75.128.97 in hosts_require_auth? yes (matched "mail.kidns.de")
---------------------------

Afaict if the gethostbyname2() returns two IP adresses exim does not
match the hostname it originaly started with against the host list
but only the IP. - This seems broken to me.

Complete log and configuration can be found on
http://nazgul.freealias.de/exim.html - This is 4.31.
               cu andreas
PS: Thanks to Jonas Meurer for experiencing the bug and helping to
search for the cause. ;-)