[exim] send mail based on origin domain

Góra strony
Delete this message
Reply to this message
Autor: Nicolas Leonel
Data:  
Dla: exim-users
Temat: [exim] send mail based on origin domain
Hi guys,

Im using Sendgrid to send out email through my exim server, it uses a
remote SMTP host, port, username and password for sending email. The
problem is that now I would like to segment my delivery through multiple
SMTP users, aka SendGrid Sub-users.

It appears I can do this by either using their API or through the MTA which
I believe would be easier to implement, my question is does anyone know how
to specify a certain SMTP user and password depending on the domain used to
send the email from?

Below is the exim config involved for sending through SendGrid, let me know
if you want me to paste the entire config and I will do it right away.

Thanks in advance for all the help!

Section: AUTH

sendgrid_login:
driver = plaintext
public_name = LOGIN
client_send = : username : password


Section: PREROUTERS

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

Section: TRANSPORTSTART

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

--
Best Regards,

Nick.

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>