[exim] How to choose the outgoing IPs for an E-Mail

Top Page
Delete this message
Reply to this message
Author: Luca Bertoncello
Date:  
To: Exim Users ML
Subject: [exim] How to choose the outgoing IPs for an E-Mail
Hi, List!

I'd like to have a file such this:

lucabert.de: ips=<; 84.200.210.163 ; 2001:1608:10:24:1::1
other.domain.tld: ips=<; 84.200.210.164 ; 2001:1608:10:24:300::1
v4.domain.tld: ips=84.200.210.165

and having the given IPs be used to send E-Mails from these domains...

I think, I have to use this file in the transports, and I tried this:

remote_smtp:
driver = smtp
helo_data = $smtp_active_hostname
interface =
${extract{ips}{${lookup{$sender_address_domain}lsearch{/etc/exim/mailouts}{<;
84.200.210.163 ; 2001:1608:10:24:1::1}}}}

Unfortunately, it does not work...
It will always used an IP I didn't give in any configuration...

Could someone help me?
Of course, I need to have a default, if the $sender_address_domain does not
have an entry in /etc/exim/mailouts.

Thanks for any help!
Luca Bertoncello
(lucabert@???)