Autor: Jasen Betts Data: A: exim-users Assumpte: Re: [exim] Router only once per message?
On 2015-01-23, Robert Blayzor <rblayzor.bulk@???> wrote: > On Jan 23, 2015, at 1:00 PM, Jeremy Harris <jgh@???> wrote:
>>
>> Not tried, but if you use a redirect router to route to
>> original-recipient + dummy-account (and have the dummy-account
>> set up for the required Maildir) - does it dedup in the
>> multi-recipient case?
>
>
> I have not tried a redirect. I was trying to drop the message to a path/maildir that didn't even have an account; for archiving or intercept reasons. I also did not want to change the original message outbound at all. (if there were any recipient re-writes, indication it was re-directed, etc.) Also redirection *could* cause bounce if for some reason there was a problem with the dummy account.
that's how I do it too.
Split your shadow_copy_out router into two halves
the first have uses the redirect router, your conditions and unseen
flags and rewrites the recipient name to some sort of nonsense address
eg: "data=shadow_copy@fakedomain"
then specifies "redirect_router=shadow_copy_out2"
The shadow_copy_out2 router goes below the final router in your
routter list where it won't normally be run and does the other parts
of youur shadow_copy_out router, but is not flagged unseen
So exim does the unseen redirect once, runs the shadow_copy_out2
router once and the transport and records "shadow_copy@fakedomain"
as being delivered, the second time trhrough the routers
"shadow_copy@fakedomain" is already delivered so it stops that path at
shadow_copy_out2 and only does the specified recipient copies.