Configuring smtp2go Email Relay on WHM/cPanel

Configuring smtp2go Email Relay on WHM/cPanel

In this guide, I will set up an email relay on WHM/cPanel to smtp2go.com

 I choose smtp2go to register for free mail relay service because their free plan supports:

  • 5 domains
  • 1,000 emails/day

Register on smtp2go

Register for a free account on smtp2go and after activating the account navigate to Settings > SMTP Users and create a new user that will be used for sending emails.

image 21 1024x499 - Configuring smtp2go Email Relay on WHM/cPanel

Save those login details for the next step.

Under Settings > Verified Senders add your domain or email address from which the emails will be sent:

image 27 1024x452 - Configuring smtp2go Email Relay on WHM/cPanel

If you selected a single email address, click on the verification link sent to it:

image 28 - Configuring smtp2go Email Relay on WHM/cPanel

Configure Email Relay on WHM/cPanel

Go to WHM > Service Configuration > Exim Configuration Manager > Advanced Editor

image 20 1024x662 - Configuring smtp2go Email Relay on WHM/cPanel

Find Section: AUTH and add the following:

mail_login:
driver = plaintext
public_name = LOGIN
client_send = :UserRelay:PasswdRelay

UserRelay is the username and PasswdRelay is the password created in step 1 on smtp2go.

image 22 - Configuring smtp2go Email Relay on WHM/cPanel

Find Section: POSTMAILCOUNT or Section: ROUTERSTART and edit only one of them!

remoteserver_route:
driver = manualroute
transport = mail_smtp
domains = !+local_domains
route_list = * mail.smtp2go.com::587 randomize byname
image 23 - Configuring smtp2go Email Relay on WHM/cPanel

Find Section: TRANSPORTSTART and in it add:

mail_smtp:
driver = smtp
hosts_require_auth = *
tls_tempfail_tryclear = true
headers_add = X-AuthUser: ${if match {$authenticated_id}{.*@.*}\
{$authenticated_id} {${if match {$authenticated_id}{.+}\
{$authenticated_id@$primary_hostname}{$authenticated_id}}}}
image 24 - Configuring smtp2go Email Relay on WHM/cPanel

After adding all the information, don’t forget to click on the Save button at the bottom and if the Exim server resets successfully, you have configured Email Relay and can check sending and receiving emails via the Relay system.

chrome 3ZaRv1Fwc2 - Configuring smtp2go Email Relay on WHM/cPanel

Test (and retest) emails

Create a new email account and test sending emails from it:

image 30 - Configuring smtp2go Email Relay on WHM/cPanel

If everything is okay you will receive the email via smtpservice.net

email smtp2go cpanel test - Configuring smtp2go Email Relay on WHM/cPanel

Change Exim retry interval (optional)

I recommend changing the Exim delivery retry interval under Section: RETRYSTART

* data_4xx F,4h,1m
* rcpt_4xx F,4h,1m
* timeout F,4h,1m
* refused F,1h,5m
* lost_connection F,1h,1m
* * F,6h,5m
image 31 - Configuring smtp2go Email Relay on WHM/cPanel

Edit /etc/default/exim or /etc/sysconfig/exim and set:

QUEUE= 60s

Change the maximum number of concurrent users in the queue in/etc/exim.conf

queue_run_max = 50

and restart Exim to apply changes.

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.