This article will guide you to change Outgoing Mail Server IP in WHM.
By default, outgoing emails from any Mail server are sent from the server’s shared/primary IP address. The dafault mail server of WHM/cPanel is Exim.
If you don’t want to take any chance that the recipient mail servers or spam filters mark your email as spam, you should have the rDNS record for your mail domain or server’s hostname which points to the EXIM’s outgoing IP address.
There are two ways to change the outgoing mail server IP address in WHM.
Automatic Configure Exim Outgoing IP address:
This will configure the Exim mail server to send emails from each domain’s dedicated IP address.
First, change the rDNS records for each server’s IP address to point to the relevant domain.
- Login to the WHM panel.
- Go to Exim Configuration Manager under the Service Configuration option.
- Search the Send mail from the account’s IP address feature in the Basic Editor section under the Exim Configuration Manager.
- Enable that feature to send mails from cPanel account IP address.
Manually Configure Exim Outgoing IP address:
This allows you to make custom changes in the Exim configuration.
First, you are required to enable the following settings in the Basic Editor section under Exim Configuration Manager.
+ Reference /etc/mailhelo for outgoing SMTP HELO
+ Reference /etc/mailips for outgoing SMTP connections
Now, connect to your server through SSH and create a /etc/mailhelo file, and add your domains and hostnames as per the following example.
The mailhelo file holds the data of Exim configuration for the HELO command.
- example.com: example.com
- sub.example.com: example.com
- example.net: example.net
- addon.example.net: example.net
- *: hostname.example.com
Now, create a /etc/mailips file and add the outgoing IP address of each domain as per the following example.You can assign a dedicated IP address to any of your domains. The mailips file holds the IP address from each domain that sends an email.
The * symbolizes the other domains.
Once you modify/create both the files as above, Save and Exit from the server.
If you enjoyed this tutorial, then you would love our support! All Kemuhost hosting plans include 24/7 support from our amazing support team. Check out our web hosting plans and have your website migrated for free today!