An Easy Way to Configuring Relay Host in cPanel Exim

An Easy Way to Configuring Relay Host in cPanel Exim

If you’re setting up a mail server to send the outgoing emails to a particular server, you’re also required to configure relay host in cPanel Exim. It can be challenging for those doing this for the first time. But do not worry. Here, we explain the easiest way to configure relay host in cPanel Exim in a few simple steps.

Configure SMTP Relay Host
SMTP or Simple Mail Transfer Protocol works in the background and facilitates sending and monitoring outgoing emails. There’s another thing called the SMTP relay service, also known as SMTP gateway service. This relay service is more advanced than the regular SMTP and is employed for transaction or marketing emails. You need to configure the SMTP relay service in cPanel Exim.

Here’s how mail delivery works in general in case you want to know:
  • You create an email in Roudcube, which is a Mail User Agent (MUA), in cPanel
  • The MUA then transfers on the message to MSA or Mail Submission Agent, which further sends it to multiple MTAs or Mail Transfer Agents
  • The email will pass through the required MTAs before finally dropping in the recipient’s inbox, which is the Mail Delivery Agent or MDA
The multiple MTAs used in the email transmission process use the SMTP language for communication. They will first accept the incoming email, queue them up in order, and send to the appropriate MTA for delivery.

Before you configure the SMTP relay host in cPanel Exim, here are the things you’d need:
  • Hostname of SMTP server
  • Login credentials of WHM ready
You don’t need to authenticate anything.

Then follow the steps to configure relay host in cPanel Exim:

Login to WHM

Go to https://host_ip:3042 to visit the WHM and login. Use the hostname of your server instead of 3042.

Add SPF

After you’ve logged in, navigate to Main>Service Configuration>Exim Configuration Editor. Here, you need to search and locate ‘SPF include hosts for all domains on this system’ option. Then change its setting from ‘None’ to ‘spf.smtprelay.snel.com’. Finally, click on ‘Save’ button

Configure MTA

In Exim Configuration Editor, you need to click on the Advanced Editor button and then search for ‘Section: POSTMAILCOUNT’. Within this, you need to add the following:

Code:
smart_route:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
transport = remote_smtp
route_list = * smtprelay.snel.com::587
no_more
There’s a possibility that you may not find the Section: POSTMAILCOUNT option. In that case, find the ‘Section:ROUTERSTART’ option and add the following code:

Code:
smart_route:
driver = manualroute
domains = ! +local_domains
ignore_target_hosts = 127.0.0.0/8
transport = remote_smtp
route_list = * smtprelay.snel.com::587
no_more
Save the changes and exit

The last step to save changes you’ve made. So scroll to the bottom and tap on the ‘Save’ button. To reflect the changes apply the new configurations, restart the mail server.

So that’s how easy it is to configure relay host in cPanel Exim. In case of any issues, contact the hosting support team for assistance.
Author
kumkumsharma
Views
2,025
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top