1. Linux
  2. Security

Remote SMTP settings cPanel

Remote SMTP settings configuration in cPanel is required when you want to host your emails separately from the website. In this case some modifications should be done on the side of both local and remote mail server. In this article we will cover cPanel settings for correct remote SMTP functionality.

Local server config

Configure Remote SMTP IPs

  • Login to the WHM
  • Locate “Configure Remote Service IPs” under “IP Functions
Configure remote SMTP IPs
Configure remote SMTP IPs
  • Enter IP of your remote SMTP server. Save.

Email Routing Configuration

The next step is to tell your local server that emails will be routed through the remote SMTP server. In order to do this, find “DNS Functions” > “Email Routing Configuration

Email Routing Configuration in WHM
Email Routing Configuration in WHM

Select your domain name.

Edit Email routing for a domain

Choose “Remote Mail Exchanger”.

Remote Mail settings in WHM
Remote Mail settings in WHM

This will ensure that local server will not be serving emails even if some mail traffic comes. You need to keep in mind that within cPanel/WHM you have the DNS server running. And when traffic is routed to the server via “A” record, without above setting active, you can be surprised that mail traffic is still routed via local server despite DNS settings pointing emails to the remote server.

Remote SMTP server settings

Disable SMTP restrictions on both servers to ensure that server allows outgoing SMTP connections besides system users like root and mailman.

Find “Security Center>SMTP Restrictions“.

SMTP Restrictions location in WHM
SMTP Restrictions location in WHM

Disable.

Disable SMTP Restrictions
Disable SMTP Restrictions

If you run an older version of cPanel/WHM, then you can find SMTP Restrictions settings within “Tweak Settings” > “Mail”.

SMTP Restrictions in Tweak Settings
SMTP Restrictions in Tweak Settings

After applying the above configuration, you can go ahead and use the remote SMTP hostname within your website software. We recommend simply transferring the whole website account (using cPanel/WHM Transfer Tool) to the mail server in order to have all your email account intact.

Comments to: Remote SMTP settings cPanel

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