Re: Which MTA for from-based smarthost selection, local delivery and queuing?
Julio Herrero (2022/09/09 15:07 +0200):
> El mié, 07-09-2022 a las 22:31 +0200, Sébastien Hinderer escribió:
> > I would like to be able to
> > configure the SMTP server to use based on the address I am using in
> > the
> > > From header. For instance, if I am sending from my personal account
> > > then
> > I'd like to use one smarthost and SMTP configuration, but if I am
> > sending from my work address, I would like the MTA to choose my
> > work's
> > SMTP server as its smarthost. Am I correct that exim4 does not allow
> > for
> > such a configuration?
>
> I do that using an exim specific router.
>
> $ cat /etc/exim4/conf.d/router/160_exim4-config_myfrom_1
>
> from_router_1:
> debug_print = "R: from_router_1 for $domain"
> driver = manualroute
> domains = ! +local_domains
> condition = ${if eq{$sender_address}{yourfromaddress@example.com}}
> same_domain_copy_routing = yes
> route_data = smtp.yoursmarthost.com
> transport = remote_smtp_smarthost
Thanks! It's good to know exim actually can do it! I'm scared to touch
its configuration because, at the moment, I am in single-file
configuration mode but I will consider this possibility!
I eveninstalled the info documentaiton and it's already strange that to
read the doc one needs to type `info spec`...
Thanks again, all the answers I recevied are great and precious!
Sébastien.
Reply to: