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.
![Configuring smtp2go Email Relay on WHM/cPanel image 21 1024x499 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-21.png?resize=736%2C359&ssl=1)
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:
![Configuring smtp2go Email Relay on WHM/cPanel image 27 1024x452 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-27.png?resize=736%2C325&ssl=1)
If you selected a single email address, click on the verification link sent to it:
![Configuring smtp2go Email Relay on WHM/cPanel image 28 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-28.png?resize=736%2C652&ssl=1)
Configure Email Relay on WHM/cPanel
Go to WHM > Service Configuration > Exim Configuration Manager > Advanced Editor
![Configuring smtp2go Email Relay on WHM/cPanel image 20 1024x662 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-20.png?resize=736%2C476&ssl=1)
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.
![Configuring smtp2go Email Relay on WHM/cPanel image 22 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-22.png?resize=736%2C404&ssl=1)
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
![Configuring smtp2go Email Relay on WHM/cPanel image 23 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-23.png?resize=736%2C499&ssl=1)
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}}}}
![Configuring smtp2go Email Relay on WHM/cPanel image 24 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-24.png?resize=736%2C447&ssl=1)
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.
![Configuring smtp2go Email Relay on WHM/cPanel chrome 3ZaRv1Fwc2 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/chrome_3ZaRv1Fwc2.png?resize=459%2C113&ssl=1)
Test (and retest) emails
Create a new email account and test sending emails from it:
![Configuring smtp2go Email Relay on WHM/cPanel image 30 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-30.png?resize=736%2C656&ssl=1)
If everything is okay you will receive the email via smtpservice.net
![Configuring smtp2go Email Relay on WHM/cPanel email smtp2go cpanel test - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/email-smtp2go-cpanel-test.png?resize=736%2C294&ssl=1)
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
![Configuring smtp2go Email Relay on WHM/cPanel image 31 - Configuring smtp2go Email Relay on WHM/cPanel](https://i0.wp.com/pcx3.com/wp-content/uploads/2022/10/image-31.png?resize=736%2C556&ssl=1)
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.