How to change the mail server IP for sending emails, if your server ip address is blacklisted in TOP-LEVEL email providers ?

Sometimes the emails that we have sent being rejected by top level email providers because of the server IP blacklisted. In this situation where we are not able to sent or our messages that we have already sent is reached to the spam folder of others, the first step is check your IP is in any Blacklist. Here is the link to check IP black list . If your server IP address is not in this listed blacklist then the issue related to any other not related to your server IP.

If it is in Blacklist, (I) You must to take necessary actions/steps to remove IP address from there. (II) Here we have an alternative method to use another IP address for your Mail server. Here I’m explaining how to use an alternative IP address for Mail servers in a WHM/cPanel based servers.

Step I:  Add new IP address to your server.

Via WHM : Home » IP Functions » Add a New IP Address

Step II: Add IP to Mail server

SSH to server
[[email protected]]# vi /etc/mailips (And add the new IP address as mentioned below: )

step III: Add a RDNS entry, It may help DC to find you

[[email protected]]# vi /etc/mail_reverse_dns HOSTNAME

Step IV: (Not necessary)
Change file attribute of /etc/mailips

[[email protected]]# chattr +i /etc/mailips
[[email protected]]# lsattr /etc/mailips
----i-------- /etc/mailips

Step V:
Final step; Re-build exim config file to reflect the changes then restart Exim service.

[[email protected]]# /scripts/buildeximconf
[[email protected]]# service exim restart

Then login to WHM panel and follow the steps pasted below for using our new IP address to send emails

Login to WHM (https:IPAddress:2087) >> Home >> Service Configuration >> Exim Configuration Manager >> In Basic editor section select Domain and IP's >> turn on "Reference /etc/mailips for outgoing SMTP connections" section >> SAVE

Please refer the attached image for more details.


That’s it 🙂


Related Links:
Quick way to remove all emails from the mail queue – Exim command line option
How to count emails in mail queue with mail senders’ name – Exim command
Check spamming on server having EXIM