HOW TO CHANGE EXIM MAIL SERVER'S IP ADDRESS, FOR SERVER WITH CPANEL?

In cPanel/WHM, Exim uses main server’s IP to send mails, this can be edited and changed to any other available IP using the following :

We can also consider it as a temporary workaround to the blacklist problem due to spam issues, and as mentioned, it is a temporary solution, you have to make sure that you identify and stop the outgoing spam mails from the server, for a permanent resolution to the blacklist.

1. Get in to WHM
2. Search, Exim Configuration Editor
3. Check the box next to:
4. Send outgoing mail from the ip that matches the domain name in /etc/mailips
5. Now click on Save
6. Now login to server ssh with root
7. Edit the file /etc/mailips
8. Add *: ReplacewithnewIP
9. Restart the exim service on server , with service exim restart command
10. Now edit the exim configuration file with command vi /etc/exim.conf
11. Find the entry remote_smtp
12. You can see an entry shown as below

remote_smtp: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}}

You have to change it to:

remote_smtp:
driver = smtp
interface = 1.1.1.1 # Change to your server IP address.

13. you must click Save button to reflect the changes and then restart the exim service on the server.

Successfully you have edited the Exim Mail Server's IP Address.


Was this answer helpful? 0 Users Found This Useful (0 Votes)