Mail Server IP - Urgent help required.

benty2004

Registered
Jan 24, 2011
2
0
51
I am having massive problems as my main cPanel IP mail server is on a lot of blacklists due to high spamming of emails from customers and I am now having problems sending emails to many providers. (i.e. Windows Live, Google, etc.)

Is there any way I can change my main email server IP in cPanel where all my mail will go through that IP only.

Any help/suggestions will be greatly appreciated, thanks in advance.

Regards, Benty.
 

garrettp

Well-Known Member
PartnerNOC
Jun 18, 2004
312
1
166
cPanel Access Level
DataCenter Provider
If spam is originating from your server, you will want to address the source of it first as changing the IP the mail is coming from will only be a very temporary stopgap before the RBL providers block that IP as well (if they haven't already blocked your entire allocation).

Add the following line to your Exim config using the Advanced Exim Configuration editor in the WHM, and then start looking through /var/log/exim_mainlog for sources of the junk.

Code:
log_selector = +arguments +subject
 

benty2004

Registered
Jan 24, 2011
2
0
51
If spam is originating from your server, you will want to address the source of it first as changing the IP the mail is coming from will only be a very temporary stopgap before the RBL providers block that IP as well (if they haven't already blocked your entire allocation).

Add the following line to your Exim config using the Advanced Exim Configuration editor in the WHM, and then start looking through /var/log/exim_mainlog for sources of the junk.

Code:
log_selector = +arguments +subject
all of the above i did just need to set a full new ip then all will be good

Any help/suggestions will be greatly appreciated, on seting a new main mail ip to cpanel thanks in advance

Regards, Benty.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
42
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
You can change the gateway IP for the server by changing it to the following in /etc/mailips:

Code:
*: newIP#
You then don't have to change the main server IP, but can simply change the gateway IP for mail. You'll want to ensure you have port 25 opened for that IP in the firewall to send and receive on port 25.

Next, you'll also want to set the following options in WHM > Exim Configuration Editor:

- Send HELO based on the domain name in /etc/mailhelo (*: HELONAME can be added to the file to change the default helo name) [?]
* On

- 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) [?]
* On

You'd then want to also fill out the /etc/mailhelo and /etc/mail_reverse_dns files with the following:

/etc/mailhelo file contents

Code:
*: hostname.server.com
/etc/mail_reverse_dns file contents

Code:
newIP#: hostname.server.com
Thanks!

Replace hostname.server.com with the PTR record for the IP.