How to change outgoing mail server IP, Mail server IP, avoid BlackListing through SSH and WHM? | Web Hosting | Domain Registration | Wordpress Hosting | SSL Certificates

How to change outgoing mail server IP, Mail server IP, avoid BlackListing through SSH and WHM?

How to change outgoing mail server IP?





Sometimes, its handy to change the IP address that Exim uses. This can happen, when an IP address is either in a RBL or when you don't have a PTR for one of the IPs and you don't want to wait for the PTR to be setup on the other IP. Please follow the below step by step:

How to change the main EXIM IP:
  • Login to the WHM (The login information is in your welcome email)
  • Once logged in, on the left you will see a long list, scroll down until you see "Service Configuration"
  • Then click on "Exim Configuration Editor", now we will need to edit the IP here.
  • Search for the following line:
    ** Send outgoing mail from the ip that matches the domain name in /etc/mailips (*: IP can be added to the file to change the main outgoing interface)
  • You will need to check the box, right next to it. Once that's done, scroll down to the bottom of the page, and click "Save Changes".
Modification from SSH [ADVANCED]:

Now, we will need to edit the "/etc/mailips" section, this will require SSH access, and a little bit of SSH knowledge. If your not sure, please don't do this, and ask for help from your web administrator or developer.
  • Login using SSH (The SSH information is contained within your welcome email)
  • Now, we will need to edit the /etc/mailips file.
  • Once your editing this file with your favorite text editor (nano, vi, etc…), add the following line:
    *: Your-New-IP
  • Please replace "Your-New-IP" with the IP address that you wish to use, you may use the second IP that you where provided with your VPS order.
  • Now, please save the changes and restart EXIM.
  • You may restart EXIM by doing: /etc/init.d/exim restart
Congratulations, you've successfully completed the EXIM IP change over!

SHARE