Re: [exim] Archiving Problems

Top Page
Delete this message
Reply to this message
Author: Dean Bishop
Date:  
To: Chris Wilson
CC: exim-users
Subject: Re: [exim] Archiving Problems
Hold on a tic. This still looks like it would also skip the original
messages that should be archived in the sender's outbox archive.

Doesn't the redirect router (aliases) just check to see if the domain is
local and if it is then skip the archive router?
Is there some way to determine if the message is being routed to an
alias rather than routed to an account?

Am I _still_ missing something?

Thanks,
dean





-----Original Message-----
From: Chris Wilson [mailto:chris@qwirx.com]
Sent: Saturday, December 03, 2011 5:36 PM
To: Dean Bishop
Cc: exim-users@???
Subject: Re: [exim] Archiving Problems

Hi Dean,

On Sat, 3 Dec 2011, Dean Bishop wrote:

> So my archiving routers are such:
> outgoing_archiver:
> # works but duplicates messages sent from local to a local alias


When you say it duplicates them, do you mean that they appear once in
outgoing_local_copy and once in incoming_local_copy, or do they appear
multiple times in outgoing_local_copy?

> I read the manual on redirect_router and it seems apropos but I can't
> see where to put it.


In all of your routers which have "driver = redirect".

> actually, reading your message again I may be beginning to see the
> light. If I put the redirect router at the top of my routers or at
> least before the outgoing_archiver router, it's checking to see if the


> message is directed at an alias and if it is then skip the
> outgoing_archiver.


No, if you put all your redirect routers (driver = redirect) before the
archivers, then you will get a copy of the message for every address
resulting from alias expansion, which is more or less the same as you're
seeing now.

The aim of adding redirect_router to your redirecting routers is to skip
passing through outgoing_archiver and incoming_archiver a second time
for each expanded alias, as you are seeing now. You can do this by
telling these routers that after redirection, they should start
processing the expanded addresses with the router after
incoming_archiver, instead of at the top.

> aliases:
>     driver = redirect
>     data =
> ${lookup{$local_part}wildlsearch{/etc/exim/domains/$domain}}
>     condition =
> $(lookup($sender_domain}wildlsearch{/etc/userdomains}}
>     # this is the important part:
>     # don't archive redirected emails again!
>     redirect_router = dnslookup

>
> Is that sane?


Kinda. The condition should evaluate to true or false, not a lookup. But
I don't think you even need to add it. Just add "redirect_router =
dnslookup" (assuming that dnslookup is the router immediately after
incoming_archiver) to all your redirecting routers.

Cheers, Chris.
-- 
_____ __     _
\  __/ / ,__(_)_  | Chris Wilson <chris+sig@???> Cambs UK | / (_/
,\/ _/ /_ \ | Security/C/C++/Java/Ruby/Perl/SQL Developer |
\__/_/_/_//_/___/ | We are GNU : free your mind & your software |