How to change outgoing mail server IP in cPanel Print

  • 0

We can simply change the outgoing mail server IP in cPanel using the following steps. It would help you to resolve the email deliverability issue if your Exim server IP got blacklisted in RBLs.

First, you need to enable the option “Reference /etc/mailips for outgoing SMTP connections” in Exim configuration.

WHM >> Service Configuration >> Exim Configuration Manager

Then enable “Reference /etc/mailips for outgoing SMTP connections“.

Log in to the server via SSH once it is activated and edit the file /etc/mailips using your favorite editor. I am using VIM editor here.

 
vim /etc/mailips

Add the following into it:

 
*: <IP_ADDRESS>

Replace <IP_ADDRESS> with your desired IP. For example:

 
*: 192.168.1.1

Also, you can change individual domain’s outgoing mail server IP using this method. You just need to add the following to the /etc/mailips

 
domain1.com: <IP_ADDRESS_1>
domain2.com: <IP_ADDRESS_2>
*: <IP_ADDRESS_3>

This means domain1.com and domain2.com will send the email using dedicated mail server IP and all other domains in your server using <IP_ADDRESS_3>

PS: Replace domain1.com and domain2.com with your desired domain names and <IP_ADDRESS_1> , <IP_ADDRESS_2> and <IP_ADDRESS_3> with the desired IP addresses.

Once all the necessary changes have done, please restart the Exim service.

 
service exim restart

That’s it!


Was this answer helpful?

« Back