[Dovecot] dovecot lda & sieve: resubmit folder for resieving

Axel Thimm Axel.Thimm at ATrpms.net
Wed Jul 28 13:20:17 EEST 2010

On Wed, 2010-07-28 at 11:29 +0200, Patrick Ben Koetter wrote:
> * Axel Thimm <Axel.Thimm at ATrpms.net>:
> > I'm currently restructuring my mail archives and migrated from a decade
> > and a half old procmail supported solution to sieve.
> > 
> > While doing so I often found that I'd like to filter a bunch of messages
> > (with "bunch" in the area of 1-10K) with my shiny new sieve script. I
> > found in the wiki a way to do that:
> > 
> > http://wiki.dovecot.org/HowTo/RefilterMail
> > 
> > And it works well, it picks the mails via IMAP and resubmits them to
> > dovecot-lda. But unfortunately the IMAP flags including \Sent, \Flagged
> > etc are lost in the process.
> > 
> > I started checking for other solutions beside getmail that might extract
> > the imap flags as well, but I wouldn't know how to pass them to
> > dovecot-lda.
> Would it help to use sieve capabilities to add flags?

First getmail/fetchmail etc. would have to add some custom headers like 

X-Sieve-Please-Add-These-Flags: \Seen

But before that can happen getmail/fetchmail need to be able to retrieve
the IMAP flags and add them to a header, finally sieve would need to be
able to remove this header to restore the mail back to its original

If dovecot/pigeonhole could manage the resubmission internally, then you
also have the benefit, that it wouldn't need any extraction/reinsertion
in formats like dbox at all (unless sieve allows changing headers/body).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20100728/c6831a5e/attachment.bin 

More information about the dovecot mailing list