On Thu, 23 Aug 2007, martin f krafft wrote:
Hi there,
I found that with an IMAP command like
<unique-leader> STORE 0 +FLAGS (testflag)
I can set arbitrary flags on mails through the dovecot IMAP daemon. This rules.
Now I wonder, however, how I can remove those flags, which become properties of the folder, really. For instance, after the above, SELECT on the containing folder gives:
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft testflag)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft testflag \*)] Flags permitted.
Even if I remove the flag from all messages or even delete all messages in the folder, the flag stays on the folder.
Is there an IMAP way of removing flags from a folder?
Funny, I just went through this moments before I saw this message. As far as I know, there is no way to do it other than to delete the dovecot.index files on the server. If you don't have access to the server, then there probably is no way given the current IMAP protocol.
If you do delete the index files, make sure your dovecot-keywords file is correct (any test keywords removed) before reconnecting to the server (probably best to stop it, do the operations, then start the server again). If you use Maildir format, the keywords should match the filenames as described in the wiki:
http://wiki.dovecot.org/MailboxFormat/Maildir#head-4111d229e8294e0c08d88ea31...
Note that if you have more than 26 keywords, some of them will be lost if the index files are deleted.