Re: [exim] Archiving Problems

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Dean Bishop
Dátum:  
Címzett: Chris Wilson
CC: exim-users
Tárgy: Re: [exim] Archiving Problems
Hey Chris,

    Sorry, as I mentioned I'm kinda new at exim so I hope I'm
getting this all straight.


So my archiving routers are such:
outgoing_archiver:
# works but duplicates messages sent from local to a local alias
condition = ${if and {{exists{${extract{5}{:}{${lookup
passwd{${lookup{$sender_address_domain}lsearch*{/etc/userdomains}{$value
}}}{$value}}}}/mail/$sender_address_domain/$sender_address_local_part}}{
!eq{$sender_address_local_part}{root}} } }
debug_print = true
unseen
no_expn
verify
transport = outgoing_local_copy
driver = accept

incoming_archiver:
require_files = "+${extract{5}{::}{${lookup
passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/
etc/$domain/passwd"
condition = ${lookup {$local_part} lsearch{${extract{5}{:}{${lookup
passwd{${lookup{$domain}lsearch*{/etc/userdomains}{$value}}}{$value}}}}/
etc/$domain/passwd}{true}{false}}
no_expn
no_verify
unseen
domains = +local_domains
transport = incoming_local_copy
driver = accept

I read the manual on redirect_router and it seems apropos but I can't
see where to put it.
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.

Brilliant!! Okay, I think I actually get it. Now here's the hitch,
what happens to messages sent from outside to aliases??

Pop! Thfffpt. Damn, I think that ruins it. :(

Am I wrong? Hmmmm....a quick condition in the redirect router to see if
it's from the local machine and if not then skip the skipper?

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?

Thanks,
dean

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

Hi Dean,

On Sat, 3 Dec 2011, Dean Bishop wrote:

> I'm not sure if you've misunderstood but then maybe I'm
> misunderstanding your message :).
>
> The only two routers involved in the archiving are the incoming router


> and the outgoing router.


Yes, I'm not sure why you need to separate them?

> The way I understand it, and this is based on what I consider my
> pretty slim knowledge of exim, is that when a message is being sent to


> the local alias from the local account the message is first archived
> as it passes through as it's being sent from sender's local account
> and then the outgoing message is archived again as it sent from the
> local alias to the recipient's local account.
>
> It's this last piece that I cannot figure out how to avoid. How do I
> make the router ignore messages that are being passed through during
> the re-direction from alias to account?


In that case I think that the solution I proposed should apply to your
case.

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