Re: [exim] send mail based on origin domain

2018-02-16 Thread Phil Pennock via Exim-users
On 2018-02-16 at 12:21 -0300, Nicolas Leonel via Exim-users wrote:
> I apologizes but my exim knowledge is extremely limited, can you share an
> example on how to setup two different users with that example.

I did.  In the linked message:

> >   https://lists.exim.org/lurker/message/20171015.030553.5600347d.en.html

If you read that, you have a worked example of the various stanzas for
parts of Exim configuration.

If you need more than that, then I'm not the person to help you.  Paid
professional support from someone might help.

Regards,
-Phil

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] send mail based on origin domain

2018-02-16 Thread Nicolas Leonel via Exim-users
I apologizes but my exim knowledge is extremely limited, can you share an
example on how to setup two different users with that example.

Thanks so much and sorry for the hassle.


On Fri, Feb 2, 2018 at 7:30 PM, Phil Pennock  wrote:

> On 2018-02-01 at 13:32 -0300, Nicolas Leonel via Exim-users wrote:
> > 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?
>
> Yes.  This post might help:
>
>   https://lists.exim.org/lurker/message/20171015.030553.5600347d.en.html
>
> The two censored-for-web email addresses in the sample config extract
> were `x...@gmail.com` and `z...@example.org`.
>
> In essence: in the Router, use a lookup of `$sender_address` in some
> data-source to get space-separated key=value pairs and stash that with
> the `address_data` option, then refer to `$address_data` in the
> Transport via `${extract{keyname}{$address_data}{true-val}{false-val}}`
> to get the values of various options.
>
> -Phil
>



-- 



Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


Re: [exim] send mail based on origin domain

2018-02-02 Thread Phil Pennock
On 2018-02-01 at 13:32 -0300, Nicolas Leonel via Exim-users wrote:
> 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?

Yes.  This post might help:

  https://lists.exim.org/lurker/message/20171015.030553.5600347d.en.html

The two censored-for-web email addresses in the sample config extract
were `x...@gmail.com` and `z...@example.org`.

In essence: in the Router, use a lookup of `$sender_address` in some
data-source to get space-separated key=value pairs and stash that with
the `address_data` option, then refer to `$address_data` in the
Transport via `${extract{keyname}{$address_data}{true-val}{false-val}}`
to get the values of various options.

-Phil

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


[exim] send mail based on origin domain

2018-02-02 Thread Nicolas Leonel via Exim-users
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.


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/