Autor: Phil Pennock Datum: To: ml CC: exim-users Betreff: Re: [exim] Exim: smart_route / routing based on From:
On 2006-02-23 at 13:42 +0100, ml@??? wrote: > smart_route:
> driver = manualroute
> domains = ! +local_domains
> transport = remote_smtp
> route_list = "* serverabc"
>
> which works pretty good, but now i want one exception from this rule:
> If "From:" of the Mail (not neccessarily the Sender:) is foo@baa mails should be send
> through serverxyz.
>
> is this possibile ?
Yes, use a different Router which uses a condition rule to match on
$h_from; put this first. You can then simplify the smarthost router.
If you want to keep it all in one Router, then you can use route_data
instead of route_list and then embed the condition inside the string.
Whilst more concise, that's more confusing for a simple "if this one
address"; it does start to make sense if you want to use many different
servers for different users, or at least write it that way. For that
last case, you can then put the "user: server" stuff in a lookup file
and use:
This requires the addresslist +senders_to_serverxyz simply because I
think it's more maintainable to move that logic out to the start of the
file in the main config section with:
Regards,
--
I am keeping international relations on a peaceable footing.
You are biding your time before acting.
He is coddling tyrants.
-- Roger BW on topic of verb conjugation