[Dovecot] Put existing mails (in Maildir) through sieve filter?

Raphael Bittencourt S. Costa raphaelbscosta at gmail.com
Thu Feb 21 18:23:04 EET 2008


You can write a shell script to do this for you.

cd ~/Maildir/cur

for i in *; do /usr/local/libexec/dovecot/deliver  -d user < $i; rm -f
$i; echo "Message $i"; done

On Thu, 2008-02-21 at 16:40 +0100, Andreas Ntaflos wrote:

> Hello list, 
> the scenario: A user has about 30k mails in his Maildir (all in INBOX) and 
> needs to apply filtering. Provided he writes a working .dovecot.sieve script, 
> is there a way to put all those already delivered mails through Dovecot's LDA 
> and thus have the sieve filter rules applied? Or is there any other way to 
> apply sieve rules to already delivered mails?
> Andreas


Raphael Costa

More information about the dovecot mailing list