Exim SMTP with multiple IPs and different HELO identifiers

To enable different helo commands on multiple IPs we need to utilize the Exim router and transport settings, these are available in Exim 4+.

The first thing we need to create is a custom Router, all the options are listed here and here.

An example router:

myrouter:
 driver = dnslookup
 senders = *@mydomain.com, *@*.mydomain.com
 transport = mytransport

The senders option is a CSV list of addresses to match in the From header. These can contain regex which makes matching whole domains really easy.

The transport option is a reference to your custom transport (see below).

Next we need to create a custom Transport, all the options are listed here and here.

An example transport is:

mytransport:
 driver = smtp
 interface = 192.168.0.1
 helo_data = mail.mydomain.com

The interface setting is the IP address this transport should be used on and the helo_data is the command to send.

This makes Exim an awesome platform for shared mail servers. It is very simple to offer whitelisting and protection against spammers.

Comments