Author: W B Hacker Date: To: exim users Subject: Re: [exim] Ha: Re: How many times does router run for multiple
recipients?
vitas1@??? wrote: > Hmmm, I think I find the problem. Thanks for all pieces of advice. :-)
>
> When recipient addresses belongs to the same domain router runs only ONCE
> for this domain.
>
> So if one of recipients does NOT match the condition criteria ("condition
> failure")
> the router doesn't process the remaining recipients for THIS domain.
>
> But it WILL process recipients in another domain.
>
>
> Example:
>
> #Router configuration
> blackholes:
> # Only addr1 should be blackholed!
> condition = ${if match{$local_part}{addr1}{1}{0}}
> driver = redirect
> data = :blackhole:
> no_verify
>
>
> Assume message has 2 recipients in the same domain: addr1@??? and
> addr2@???
>
> If router "sees" addr1 first it will blackhole it (as it matches condition
> criteria) and then will process addr2.
>
> If router "sees" addr2 first it will finish it's work for this domain
> (because of "condition failure").
>
> "Unseen" option doesn't help.
You may be expecting it to do something it does not. See below.
>
> So situation looks a little strange: some recipients could be processed by
> router by some couldn't be -
ACK. That is what routers DO. One might call them 'discriminators'
> it depends on order in which recipient addresses are "seen" by router.
>
ACK. Always.
>
> Regards,
>
> Vitas.
You are just getting into the 'power' of Exim.
What you need is to make whatever is fed to the routers 'identifiable'
so that it triggers the one router you want to handle it, and no other,
- unless that 'other' is part of a deliberate set of two or more that
are chained with:
(pretend that this item is) 'unseen' (by any previous router).
IOW: 'continue' rather than 'exit the router-walk'
This is why you want to either (both..)
A) do the initial 'qualifying' in acl's.
EG: adding tags or flags in acl_m's or X-headers to make the conditional
tests in a router amenable to 'unique' but simple triggering.
AND/OR/ELSE
B) use finer-grain more specific conditionals in the routers themselves.
EG: test for more than one match in a given conditional.
In your case look for BOTH a domain AND a user-within-that-domain match,
or presence in a list or DB for those needing 'special handling'. Exim's
conditionals can be astonishingly complex IF that is what is needed to
accomplish a task.
THEN use 'unseen' only if you need to archive, quarantine, or otherwise
make two or more deliveries of the one message that 'fits' the conditional.