Setup SMTP relay / smarthost with cPanel

Introduction

If you want or need to setup your mailserver to send all outgoing mail to a specific server which will handle the delivery to the recipients you need to setup a SMTP relay or smarthost.

Prerequisites

  • You need to know the hostname of the SMTP server which is going to relay the mail for your mailserver, which is smtprelay.snel.com in our case
  • This article assumes that no authentication is necessary on the SMTP relay server
  • This article is written for cPanel with Exim
  • You need to have the login details of WHM ready

Step 1) Login on WHM
Go to https://x.x.x.x:2087 (replace x.x.x.x with the IP address of your server).

Step 2) Configure the MTA
Within WHM navigate to: Main > Service Configuration > Exim Configuration Editor, click on the Advanced Editor button and search on the page for "Section: POSTMAILCOUNT" and add the following:

smart_route:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
transport = remote_smtp
route_list = * (your ip)::587
no_more

If "Section: POSTMAILCOUNT" is not available proceed to step 3, otherwise proceed to step 4.

Step 3) ONLY IF "Section: POSTMAILCOUNT" is not available
On the same page search for "Section: ROUTERSTART" and add the following:

smart_route:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
transport = remote_smtp
route_list = * (your ip)::587
no_more

Step 4) Save changes
Click on the "Save" button on the bottom of the page to save changes and restart the mailserver to apply the newe configuration.

  • 1 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Gerelateerde artikelen

Outgoing mail is blocked

Outgoing mail on port 25 is blocked on our network. This is done to prevent abuse of our network....

Setup SMTP relay / smarthost with DirectAdmin

Introduction If you want or need to setup your mailserver to send all outgoing mail to a...

Setup SMTP relay / smarthost with Plesk with Postfix

Introduction If you want or need to setup your mailserver to send all outgoing mail to a...

Do you allow warez, warez link

No, we absolutely do not allow warez, warez linking or SPAM on our network.