Change exim interface IP address
Posted by Ashish S, Last modified by
Undefined index: editedstaff (./__swift/cache/99a2018850e43fc96b722079625d25a8.php:44)
Copy to clipboard:
on 19 May 2015 04:59:04 PM

Your server's main/shared IP address may get blacklisted by one or many RBLs due to a variety of reasons. In such situations, it becomes be very difficult to receive/send emails especially to servers using RBL based filters. In such situation a quick solution is to route the emails through a secondary IP address (if available) on the same server which is not blacklisted by any of the RBLs.

The mail server on cPanel i.e exim allows you to change the default IP address used by the mail server so that you would be able to route all emails through this new secondary IP address.

Here are the step by step instructions for you to configure your exim mail server to use new IP address.

Step 1 : Shutdown the exim service.

# service exim stop or /etc/init.d/exim stop

Step 2 : Edit your exim configuration file.

# vi /etc/exim.conf

Step 3  : Go to "remote_smtp" section under "TRANSPORTS CONFIGURATION".

By default it would look like below:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}}

Step 4 : Remove or comment line containing "interface" and "helo_data" and add new "interface" to match with that of your new IP address.

It should look as follows:

driver = smtp
interface = # Your IP address.

Step 5 : Save your changes and exit out from your exim configuration file.

Step 6 : Start exim service on your server.

# service exim restart or /etc/init.d/exim restart

Step 7 : Set a reverse DNS for the new IP address to point a valid FQDN. 

Please get in touch with our support team to get this part done. 

Step 8 : Try sending a test email and you will find that, it was sent using this new IP address configured under your exim configuration.

You can verify it by checking the header of new email under exim's log file i.e /var/log/exim_mainlog

Finally, to make the IP address change permanent, add new IP address to the /etc/mailips file. This would ensure that all the changes made above do not get reverted due to a cPanel scheduled update.

(7 vote(s))
Not helpful