Author: edouard.boucher Date: To: exim-users Subject: [Exim] Re: dnsdb query
>>>>I am secondary MX for 2 domain. >>>>I store there mail in bsmtp format and then they get to there final host by
>>>>another mean.
>>>>
>>>>when i send a mail from my host runing exim to thoses domain,
>>>>i would like the mail to first try to be sent to the primary MX, and if fail
>>>>store it in the bsmtp file.
>>>>
>>>>Thanks to Nico Erfurth for the help about how to try only once.
>>>>
>>>>I am trying not to have the primary MX name coded in a file when routing the
>>>>first time for thoses domain.
>>>>So i would like to do a dnsdb query extracting the list of the primary MX host
>>>>to feed the route_list option.
>>>>
>>>>how can i do that ?
>>>
>>>You can use the normal dnslookup-router, it will prefer the
>>>primary-mx for deliveries, but the two domains must be listed in it.
>>
>>
>> I can't do that because a loop can result (i'm using the same config file on >all
>> the 3 host), the differant secondary MX can bouce to each other the mail.
>> so i realy need to get the list of MX with the highest priority, or at least,
>> the list of MX with higher priority than the host runing exim. >Look for ignore_target_hosts in the dnslookup-router and just ignore
>your 3 mailhosts.
i can't ignore thoses 3 host, because in my config, the 3 host are secondary MX
for each other.
I realy need to extract MX record with higher priority than the localhost for
the curent domain.
anyway, i think i need to use a ${perl statment because there is no looping or
sorting in exim syntax.
the strange thing is that there is a @mx_primary var in exim, but no way to get
the primary mx for an arbitrary domain