Introduction
Many providers now block outbound connections on port 25, meaning that a cPanel system would need to configure a smarthost to allow outbound emails to function. This resource covers how to setup a smarthost using a second cPanel server on a different network.
Procedure
Please note that in the following instructions, "webserver" refers to the system on the network that blocks port 25, while "mailserver" refers to a second system through which email will be relayed.
Webserver configuration
- In WHM, navigate to "Service Configuration » Exim Configuration Manager » Basic Editor."
- On the "Mail" tab, set the "Smarthost support" value to
* $mailserverip::587
, replacing $mailserverip with the mailserver's IP address. - Click the "Save" button.
Mailserver configuration
- In WHM, navigate to "Service Configuration » Exim Configuration Manager » Basic Editor."
- On the "Access Lists" tab, set the "Trusted SMTP IP addresses" to
$webserverip
, replacing $webserverip with the mailserver's IP address. - On the "Access Lists" tab, set the "Backup MX hosts" value to the mailserver's Hostname.
- Click the "Save" button.
DNS Settings
- MX records should point to the webserver's IP.
- SPF records should include the mailserver's IP.