Sieve: Saving "pristine" messages for backups and spam training

Jeff Rice list1 at jrice.me
Mon Aug 11 15:42:05 UTC 2014


Hello,
I'm trying to work out a way to have my Sieve filter save a "pristine" 
version of email messages as a backup, primarily to use for training the 
spam filter.  I would like is to have every message saved into a single, 
site-wide directory (in the global sieve) before being processed 
additionally and delivered.  The messages in that directory will be used 
to train the spam filter without having to worry about removing 
Spamassassin headers and so forth.

I thought fileinto :copy might do what I wanted, but this creates a 
backup directory individually for each user.  That's unmanageable for 
the spam training process I use. redirect *could* work, but that adds a 
header during the process so the email saved would not be "pristine".

I'm thinking of using the extprograms plugin to pipe to a program that 
will do a simple copy.  That feels very hackish, however, and I'm hoping 
there is a more elegant solution.

Am I missing something obvious here?

Thanks!
Jeff




More information about the dovecot mailing list