[Pkg-exim4-users] How to choose a smarthost based on From: address in Exim4

Faheem Mitha faheem at faheem.info
Mon Mar 20 17:25:42 GMT 2023


Hi Ian Kelling,

See below.

On Mon, 20 Mar 2023, Ian Kelling wrote:

> I don't know what Marc Haber is talking about, but I don't think there
> are any issues. I have my workstation's exim setup to go to various
> smarthost based on the rcpt from address. That has worked well for
> years for me. Doing it that way would handle bounces, using the from
> header wouldn't. here is an example:

Thank you for your reply. Before I try to make sense of your config below, 
it would help if you could clarify a couple of things.

1)  What is the "rcpt from address"? Doing an online search does not bring 
up anything that looks relevant. I also looked through the Exim book, and 
could not find anything there either.

2) "Doing it that way would handle bounces, using the from
  header wouldn't."

First for clarity, when you refer to bounces, do you mean the case when an 
email cannot be delivered, and you get a return message to that effect? I 
don't see how this a case that needs to be handled, and also how the "rcpt 
from address" works while the "from header" doesn't. Can you elaborate, 
please?

I hope it's OK to ask questions about this. I don't work with email 
professionally, and am quite unfamiliar with the details, even though I 
happen to own a copy of the Exim book.

Regards, Faheem Mitha

> dd of=/etc/exim4/conf.d/router/188_exim4-config_smarthost <<'EOF'
> # ian: copied from /etc/exim4/conf.d/router/200_exim4-config_primary, and added senders = and
> # replaced DCsmarthost with hostname
> fsfsmarthost:
>  debug_print = "R: smarthost for $local_part@$domain"
>  driver = manualroute
>  domains = ! +local_domains
>  senders = *@fsf.org
>  transport = remote_smtp_smarthost
>  route_list = * mail.fsf.org::587 byname
>  host_find_failed = ignore
>  same_domain_copy_routing = yes
>  no_more
>
> posteosmarthost:
>  debug_print = "R: smarthost for $local_part@$domain"
>  driver = manualroute
>  domains = ! +local_domains
>  senders = *@posteo.net
>  transport = remote_smtp_smarthost
>  route_list = * posteo.de::587 byname
>  host_find_failed = ignore
>  same_domain_copy_routing = yes
>  no_more
> EOF
>
>



More information about the Pkg-exim4-users mailing list