On Wed, 2010-07-28 at 11:29 +0200, Patrick Ben Koetter wrote: > * Axel Thimm <[email protected]>: > > 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 form. 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). -- http://ATrpms.net/
signature.asc
Description: This is a digitally signed message part
