[exim] queryprogram doesnt appear to be honouring ordering o…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Adam Low
Date:  
À: Exim-users
Sujet: [exim] queryprogram doesnt appear to be honouring ordering of HOSTS=
Greetings fellow EXIM admins!

I am currently suspecting we've found a bug but if there's one thing I've
learnt, it's don't assume, ask the experts ;)

special_xheader_pane:
debug_print = "R: xheader_pane for $local_part@$domain"
driver = queryprogram
command = /usr/bin/pane_lookup.pl '$domain'
command_user = Debian-exim
condition = ${if match{$h_X-Special-Transport:}{^pane\$}}
transport = remote_smtp_pane
no_more

The typical response from the Perl script is as follows and based on the
docs, my understanding being that hosts should be utilised in order that
they're listed (and assumed host randomization is disabled, which it is).

ACCEPT HOSTS=host1.domain.net:host2.domain.net

However it seems that EXIM is ignoring the ordering of these hosts and its
unclear how it is selecting them from the list. The issue was triggered by
a customer who has three MX's listed roughly as follows:

MX 10 host1.domain.net
MX 20 host2.domain.net
MX 80 randomstring.invalid

Now obviously the final MX record, the lowest priority one, is an invalid
TLD for public use but it seems no matter what order the pane_lookup.pl
script orders the HOSTS= in, the lowest priority and clearly invalid host
is picked.

Does anyone have experience with utilising queryprogram router and how it
handles ordering and selection of SMTP next hop?

Thanks,
Adam