Answer the question
In order to leave comments, you need to log in
How to send mail in Exim4 through different IPs?
There is a web-server with several IP. Each site has its own dedicated domain/IP.
Letters are sent from sites and need to be configured so that Exim correctly detects them and sends them from the correct IP.
Otherwise, Exim sends all mail from the IP of the main interface.
I believe that you need to make a regular match, because the configuration below can only specify 1 IP
remote_smtp:
driver = smtp
interface = <IP address>
Answer the question
In order to leave comments, you need to log in
stolen from exim configs in cPanel
interface = ${if exists {/etc/mailips}{${lookup{$original_domain}lsearch{/etc/mailips}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailips}{$value}{}}}}}}}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$original_domain}lsearch{/etc/mailhelo}{$value}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{${lookup{${perl{get_sender_from_uid}}}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}}}}}{$primary_hostname}}
10.10.10.10: domain1.com
10.10.10.11: domain2.com
*: domain3.com
domain1.com: 10.10.10.10
domain2.com: 10.10.10.11
*: 10.10.10.13
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question