Re: [exim] Backup outgoing emails problem

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Marc Sherman
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Backup outgoing emails problem
areq@??? wrote:
> Hi
>
> I need to backup all outgoing emails sent by authenticated users.
>
> I created simple router:
>
> This mail was saved twice ;(
> When is 20 recipient - a have 20x this in backup mbox.
>
> Any idea how save only once ?


Here's a trick I use to ensure that only one copy of a message is stored
in my spam quarantine, even if it's sent to multiple recipients. It's
awkward, but it does the trick:

begin routers

spam_quarantine:
   debug_print = "R: spam_quarantine for $local_part@$domain"
   driver = redirect
   verify = false
   condition = $ACL_MSG_QUARANTINE
   user = msherman
   group = msherman
   directory_transport = local_spam_quarantine
   data = ${if 
eq{$local_part@$domain}{spam_quarantine_dedupe@???} \
          {/home/msherman/Maildir/.Spam.Quarantine/} \
          {spam_quarantine_dedupe@???}}


begin transports

local_spam_quarantine:
debug_print = "T: local_spam_quarantine for all addresses"
driver = appendfile
maildir_format
delivery_date_add
envelope_to_add
return_path_add
maildir_tag = :2,S
batch_max = 100

- Marc