Change Exim’s main sending IP

Categories General Info

I know an easy way. Login to your server via SSH.
From console edit the exim.conf file:

vim /etc/exim.conf

Go to this lines

driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}

and change them to:

driver = smtp
interface = Your-Second-VPS-IP-Address

Save the file and restart the Exim.
If you would like, when finished sending email, you can change the setting back to the original settings in exim.conf file.
This can be used, if for some reason, your server has been compromised via FTP or whatever, and you need to get mail sent out. I would make sure you have someone scan the server first before implementing this, because the new IP can be blacklisted just as wuickly as the first if the spammy goodness is not addressed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.