How to configure a single domain to use Sendgrid SMTP in WHM


Hi All,

I'm not sure how much use this tutorial will be to any of you, however I think it's worth me posting this should someone find it to be of some use.

Let me start with the background as to give you a better understanding for the purpose of this how to..

I have a client that wanted a specific hosting setup, this requirement was to allow them to use Sendgrid's remote SMTP server rather than using the local Exim SMTP server that their site is hosted on. So I set about finding a decent tutorial on the Internet, I was unable to find anything that was useful. This is why I have decided to write this How to, to be a simple as possible (You will need some understanding of WHM )

Let's Begin..

First login to WHM, and load the "Exim Configuration Manager" which is Located under the Service Configuration section.

Click on the Advanced Editor tab located on the top row. Once in the Advanced Editor locate the section as follows:

Section: AUTH

Within this text box paste the following:

driver = plaintext
public_name = LOGIN
client_send = : YourSendGirdUsername : YourSendGridPassword

then locate the next section as shown below:


Within this text box paste the following: 

(The red colored text should be replaced with the domain name in question that you want to use the SendGrid SMTP)

driver = manualroute
domains = ! +local_domains
senders = *@thedomainhere
transport = sendgrid_smtp
route_list = "* byname"
host_find_failed = defer

then locate the next section as shown below:


Within this text box paste the following:

driver = smtp
hosts =
hosts_require_auth =
hosts_require_tls =


Although this setup and how to was to use and explain how to configure Send Grids SMTP server, it's a starting point for use with other remote SMTP servers, you just need to change the values accordingly.

the outcome was that my clients domain was now using Send Grids SMTP server, whilst the other client hosted domains would continue to use the local SMTP server.

Members online