Linux email server for sending email from multiple IP addresses
If I understand you, you have the mail on a server, and that server has, say, 4 IP addresses configured on it. You would like you mail server, when sending to the internet, to use one of those four IPs as the outbound interface. If this is the wrong interpretation, please let me know.
The Exim SMTP transport can be configured to send email via different interfaces. In a hard coded manner you could do this:
routers:
send_domaina_com:
driver = dnslookup
domains = domaina.com
transport = domaina_com_smtp
send_domainb_com:
driver = dnslookup
domains = domainb.com
transport = domainb_com_smtp
send_domainc_com:
driver = dnslookup
domains = domainc.com
transport = domainc_com_smtp
send_domaind_com:
driver = dnslookup
domains = domaind.com
transport = domaind_com_smtp
TRANSPORTS:
domaina_com_smtp:
driver = smtp
interface = 10.0.0.1
domainb_com_smtp:
driver = smtp
interface = 10.0.0.2
domainc_com_smtp:
driver = smtp
interface = 10.0.0.3
domaind_com_smtp:
driver = smtp
interface = 10.0.0.4
I'm 99.99% the above will work, though it's obviously ugly. I think everything you need it to be handled dynamically is there ("interface" is expandable).