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. 


Re: Re[2]: Incoming mail archiving with Postfix

2009-11-26 Thread Wietse Venema
Zohan:
 Wietse, thank you,
 
  Postfix local/pipe/virtual delivery agents record the delivered
  to address in the Delivered-To: header

That is, the final recipient address after alias processing and
forwarding. All mail that is delivered to the same mailbox has the
same Delivered-To: address.

Postfix local/pipe/virtual delivery agents record the original
recipient in the X-Original-To: header. That is, the recipient
address before alias processing and forwarding.

You can embed the original recipient as an extension to the final
recipient address, if you must insist on using the Delivered-To:
header.

Using pcre-based recipient_bcc_maps:

/^(.+)@([...@]+)$/ archive+$1...@example.com

Wietse