[exim] Re: Routing based on *recipient* IP address

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jeremy Harris
Dátum:  
Címzett: exim-users
Tárgy: [exim] Re: Routing based on *recipient* IP address
On 26/10/2023 11:30, Gandalf Corvotempesta via Exim-users wrote:
> Il giorno gio 26 ott 2023 alle ore 11:48 Jeremy Harris via Exim-users
>> - condition does a dnsdb lookup, for mx
>>     and matches the required IP address

>
> Ok....i'm here.
> But dnsdb lookup returns a list of MXs , not a list (or just one from
> the list) of IP addresses.
> How can I force a dnsdb lookup to return resolved hosts to ips ?


If MX-sorting not needed:
${lookup dnsdb{a+=${lookup dnsdb{>: mxh=example.com}}}}


> I don't have a list of MXs, I have a list of IPs and I have to check
> if the returned MXs are poiting to the list of IPs


look into a "forany" expansion condition to walk the list resulting
from dns, using a match_ip expansion condition to compare each
item against your "list of IPs"

--
Cheers,
Jeremy


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/