web analytics


Blacklisted ? Switch your Mail Server IP

Tags: blacklistchange mail server ipmail serverspam

Published on: November 29, 2010 by Vipin R.N

Blacklisted ? Switch your Mail Server IP


I’m pretty sure that many of us are tired of the word ‘Spam’. How about your mails being rejected from your domain when sending to Top level E-mail providers like GMail, Yahoo and MSN Hotmail ? It may be a familiar weird issue to many of you who uses cPanel mail server. This post is about how to tackle those situations. But if you are an End-user, please contact your System Admin. But if you are the one by that name, read on !


The E-mails being rejected to the Top level providers since your server IP is blacklisted. You can check whether your server IP is blacklisted at : http://www.mxtoolbox.com/blacklists.aspx (Read xxx.xxx.xxx.xx as your server IP)

When the IP is entered and you click ‘Blacklist Check’, the resultant screen should be expected as (Assuming your server IP is on a blacklist)

There you go, your cPanel mail server IP is blacklisted, the only thing that varies is the number of blacklists. So, what is the solution ? Most will be preferring to provide a dedicated IP to the domain which is having the issue. But when a whole Server IP is blacklisted, this will not work. But as usual, there is nothing new under the Sun !!


Switch the cPanel Mail server IP of the Server.


Find a free IP, make sure its allocated to the server, or else add it to the server. That is upto you. After this, there are a few steps, which is just a Walk in the Park 🙂

1) Access the WHM of the Server, as root. Go to Exim Configuration Editor. Find out the Category Domains and IPs, and enable this option :

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)

Save the Changes.

2) Login to server through SSH, Switch to root

root@server[~]# vi /etc/mailips

Add this line
* : xxx.xxx.xxx.xx (Your Mail server IP)

So the following should be seen when reading the content in /etc/mailips

root@server[~]# cat /etc/mailips
*: xxx.xxx.xxx.xx

3) Add a Reverse DNS entry for the IP, you may need to contact DC for this. When you are finished this do the steps :

root@server[~]# vi /etc/mail_reverse_dns

Add this line
xxx.xxx.xxx.xx: hostname

4) Change File attributes of /etc/mailips

root@server[~]# chattr +i /etc/mailips
root@server[~]# lsattr /etc/mailips
----i-------- /etc/mailips

5) Final Steps : Build Exim Config file to reflect changes, Restart Exim Service

root@server[~]# /scripts/buildeximconf
root@server[~]# service exim restart

Case is Resolved ! Now you must be able to send E-mails everywhere. Try it.

Category : cPanel, Linux, Webmail

Vipin R.N

Vipin R.N

Vipin is a no-nonsense, disciplined guy who ensures that everything is carried out with the highest level of perfection. Apart from his great coding skills, he is quite interested in advanced server administration, issue analysis, documentation and training. In-depth knowledge in international politics, ammunition and automobiles makes this hard core Manchester United fan, one of the most referenced personalities in the entire team.

You may also read:


Add new commentSIGN IN

Let's Connect

Get new updates


$0.000 items