Incoming mail archiving with Postfix

2009-11-26 Thread Zohan
Hi,

I need to archive all incoming mail for my virtual domains (by copying mail to 
dedicated archive mailbox) and then sort it according to address it has been 
delivered to.

One major drawback of existing milter-based solutions, as well as of virtual 
aliasing and BCC maps, is that in some cases neither "To:" header nor 
envelope-to contain actual recipient address. This can be the case of our local 
(virtual) address receiving forwarded mail from outside, or delivery address 
being result of address rewrite or alias expansion. In either case, we state 
that the actual delivery address is known only since the moment of virtual 
transport invocation (right?). In my case pipe(8) to Dovecot LDA is used as 
virtual transport.

The question is, how do I organize mail copying simultaneously with virtual 
transport invocation (delivery), and how do I pass actual delivery address to 
mail archival system? This can be some message header or "plus" address.

Thank you!
Zohan



Re[2]: Incoming mail archiving with Postfix

2009-11-26 Thread Zohan
Wietse, thank you,

> Postfix local/pipe/virtual delivery agents record the delivered
> to address in the Delivered-To: header

Then, in which way would you recommend to copy such a message to special 
arch...@mydomain mailbox, retaining Delivered-To: header? (and not replacing it 
with "arch...@mydomain", to allow further sorting) Is it possible to do it with 
Postfix? I guess this can be done with Dovecot LDA + Sieve, by storing 
Delivered-To: into some other header and redirecting message to archive 
mailbox, but that doesnt' seem to be very elegant.