cPanel & WHMEmail

How to change the Exim Sending IP in cPanel Servers

By default, every cPanel dedicated or VPS server sends its email by using the main server’s IPv4 address. In this guide, we’re going to cover how you can change the Exim sending IP to send outgoing mail. If you have sites that use a dedicated IP, we’re also going to show you how to configure Exim to send mail through users with a dedicated IP. All steps in this article require you to have root access to your Linux VPS Server.

How to configure Exim to send using sites’ dedicated IP

  1. Login to WHM and in the search box type “Exim configuration manager”
  2. Enable the Send mail from account’s dedicated IP address option

NOTE: Ensure the correct rDNS entry is in place to avoid having your email marked as spam

How to change Exim Sending IP address

Login to WHM and in the search box type “Exim configuration manager”.

Enable the following options;

Reference /etc/mailhelo for outgoing SMTP HELO
Reference /etc/mailips for outgoing SMTP connections 

In an ssh console edit the below files. They should already be created but if not, just create them;

 nano /etc/mailhelo

In the mailhelo file place the required domain names in the following format;

domain.com: domain.com
example.domain.com: domain.com

In an ssh console open the file /etc/mailips. This file controls the IPs used to send per domain name or subdomain name

 nano /etc/mailips

In the mailips file place the domain name and IP you wish to use to send mail in the following format

example.com: 192.168.0.2
sub.example.com: 192.168.0.2 
example.net: 192.168.0.3
addon.example.net: 192.168.0.3 
*: 192.168.0.1

Save all files and then restart Exim issuing the restart command

 /etc/init.d/exim restart

Your cPanel Servers Exim sending IP should now be changed. Ensure you have the correct rDNS entries for the new IPs

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button