How do I configure exim to use smart relay for specific destination domains?

smallbiz

Member
Nov 18, 2014
6
0
51
cPanel Access Level
Root Administrator
I need to use Sendgrid to relay email for a specific destination domain - (ie if destination domain is example.com use Sendgrid, else use local relay).

I have EXIM configured to send all mail through Sendgrid, but do not want to use this scenario.

Can anyone provide a specific configuration / setup using "example.com"?

My current set up in exim:

SendGrid Relay
: AUTH
sendgrid_login:
driver = plaintext
public_name = LOGIN
client_send = : username : password

: PREROUTER
send_via_sendgrid:
driver = manualroute
domains = ! +local_domains
transport = sendgrid_smtp
route_list = "* smtp.sendgrid.net::587 byname"
host_find_failed = defer
no_more


: TRANSPORTSTART
sendgrid_smtp:
driver = smtp
hosts = smtp.sendgrid.net
hosts_require_auth = smtp.sendgrid.net
hosts_require_tls = smtp.sendgrid.net
 

smallbiz

Member
Nov 18, 2014
6
0
51
cPanel Access Level
Root Administrator
Thanks! Because Sendgrid requires authentic, and that example suggests it doesn't work with auth, wondering if anyone can assist specifically with my scenario?
 

smallbiz

Member
Nov 18, 2014
6
0
51
cPanel Access Level
Root Administrator
I reviewed the referred posting from 2011 -- but it isn't what I'm looking for (it address how to direct a cpanel domain to send out via alternative MTA).

What I want to do is for any of my cPanel clients who are using send email through their cPanel account, if they send an email to AOL.com (as an example) -- I want to use SendGrid to handle that outbound, instead of using the local EXIM MTA.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,903
2,237
463
Did you ever get a workable solution to this?
Hello :)

Could you elaborate on any specific solutions you have tried thus far? Or, have you yet to implement any custom EXIM rules?

Thank you.