Configure Smarthost (Sendgrid)

Dekz

Registered
Aug 21, 2021
4
1
3
Sweden
cPanel Access Level
Reseller Owner
Hi People ,

I want to use Sendgrid as a Smarthost for sending mail (we are using Google Cloud and they are blocking port 25).

When setting up Sendgrid at WHM level following this guide, https://support.cpanel.net/hc/en-us/articles/360036537354-How-to-use-SendGrid-as-a-Smarthost,
will our mail that we are setting up at Sendgrids end be the mail that sends the mail, even for all of the clients that we host? (that could be classified as spam? will we be the from address in the inbox?)

Should I follow this guide + the guide SendGrid provides for authenticating domains/users at the cPanel level (adding CNAME-records in the DNS-editor). Or is it enough that I do this without configuring the EXIM at the WHM level?

Hopefully will you understand my explanation,

All best! / Dejan
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,491
1,008
313
cPanel Access Level
Root Administrator
Hey there! When you setup SendGrid using the steps in our guide, your Exim server would connect to SendGrid to send the message, instead of directly to a remote mailserver like Yahoo or Gmail. This would mean your server's IP address is still included in the headers of the original message.

Is that what you were looking to find out?
 

Dekz

Registered
Aug 21, 2021
4
1
3
Sweden
cPanel Access Level
Reseller Owner
Hi cPRex :) ,

If I put it this way, I'm not sure if that is what I mean (maybe something additional to my question that I need to know?)

Previously I have been setting up my client Sendgrid accounts and adding the CNAME-records in their DNS-editor before (not on my hosting), after that it worked great.

Now when I want to set up my own hosting using cPanel, should I add to that the cPanel guide about the Exim server for it to work with all of the clients?


What if I only do it with the Exim server without the DNS editor, will the mails then be sent from my Sendgrid account, aka using my email limits and using my email [email protected] as a sender?

If I put it this way, I want each customer to be their own "from sender" in their mails.

Do they need to create their own accounts then? without or with the Exim?

All best!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,491
1,008
313
cPanel Access Level
Root Administrator
Thanks for that - I think that's enough to go on.

Previously, it sounds like you had web hosting accounts with email on a separate location.

If you wanted to send all the cPanel email through Sendgrid, using that guide I linked is the way to go. They would still show up as being their own sender, as Sendgrid just works their magic, but doesn't change the "from" address as far as I am aware. I'm not as familiar with the DNS changes you mention as I am with the Exim side, but it wouldn't use that noreply address - it would just look like a normal email.
 

Dekz

Registered
Aug 21, 2021
4
1
3
Sweden
cPanel Access Level
Reseller Owner
Big thanks :) , does that mean that I will have to use a plan that will cover all of the outgoing mails who use our mail solution?
So, they will be able to create an email account on the cpanel, and there will be no problem with sending mail?

1. What if a customer wants to use Google SMTP, or another Smarthost, should they just configure it by themself in the DNS-editor/cPanel (as I have done with my customers) without having some problems with the Exim/Sendgrid solution?

2. Could it work just that way, that I don't set it up at WHM level as provided in the guides and the customers set it up by themselfs on the cPanel? or the Exim solution has to be there?

/Dejan
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,491
1,008
313
cPanel Access Level
Root Administrator
Yes, you'd just want to make sure your plan supports all the emails you plan to send.

If they want to use a different mail solution, they'd just update their MX records for that particular domain so the mail wouldn't be handled by your server at all. However, if they are sending messages from your machine, the Smarthost would still be involved.

For a Smarthost to work on the server it has to be setup by root in Exim.
 
  • Like
Reactions: Dekz