Changing the IP of Exim is not something everyone will want to do, but if you ever had your IP(s) blacklisted you will soon find out changing Exim to use an IP other than you primary is just a fact of life. In many cases changing to another IP on your dedicated server will get you by while you work to get the blacklist cleared on your IP.
It is very easy to do, you need only to SSH into your server and locate the following file: exim.conf
You should be able to locate the Exim configuration file within your "etc" folder: /etc/exim.conf
Once you have found the exim.conf you will need to open it with a text editor nano or pico will work fine.
pico /etc/exim.conf
Once you have it open you will want to locate the following: (If you are using nano, "ctrl + w" will allow you to search for it)
remote_smtp:
driver = smtp
You will need to add another line just below the "driver = smtp", adding: interface = xxx.xxx.xxx : xxx.xxx.xxx.xxx
Once added, you should have this:
remote_smtp:
driver = smtp
interface = xxx.xxx.xxx
Make sure you replace the XXX with an IP on your server you would like to use. If you wish to use more than one IP you can separate them with a colon ":" like so:
remote_smtp:
driver = smtp
interface = xxx.xxx.xxx : xxx.xxx.xxx.xxx
Once you have edited the lines to match the above, you will need to save (ctrl + x) and then restart Exim.
service exim restart
Once Exim restarts you should now be sending emails out on the new IP address instead of the primary one on your server.
IMPORTANT NOTE:
If you are a CPanel user, you will need to need to make a slightly different edit than the above. In your conf file you will have lines like this:
remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
You will need only to remove the "interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}" and replace it to make it match:
remote_smtp:
driver = smtp
interface = xxx.xxx.xxx
The other thing you will need to be careful of, if CPanel makes an update to Exim it will change your settings. So you will need to re-edit the conf files every now and then to keep it running on the IP of your choice. At this time I am not aware of anyway around this, though there is allot of talk on the CPanel Forums.
Read original blog post