Send exim on another IP address, for a specific domain

I was looking for a way to send mail to one domain on an IP, and all other mail on another domain on another IP. The basic exim remote SMTP set up is


To switch the exim ip, the interface=IP.address configuration is used. But I wanted to have email to a particular domain go over another IP address. I came up with

interface = ${if eq {$domain}{REMOTE.DOMAIN.COM} {IP.TO.SEND.FROM}{DEFAULT.IP} }

Leave a Reply

Your email address will not be published. Required fields are marked *