To be able to send mails via different IP per domain, You need to do the following changes in the /etc/exim.conf file:

Find the “remote_smtp:” part, and add line


interface = "${lookup{$sender_address_domain}lsearch{/etc/virtual/domainips}{$value}}"


It should look something like:

exim.conf file:


remote_smtp:
driver = smtp
interface = "${lookup{$sender_address_domain}lsearch{/etc/virtual/domainips}{$value}}"


File /etc/virtual/domainips syntax:

domainips file :


domain.tld: ip.add.re.ss


That’s it. Create the domainowners file, restart exim, and You are all set!