[Dovecot] permanent flags (are very permanent)
Hello,
first of all i am not sure wheter this is a correct behavior according to the RFC or not...
Problem is, when i set a new custom permanent flag (e.g. testflag) and remove it afterwards, the flag still stays in the list of the permanent flags of this drawer even if there are no messages left with this flag set. So the keyword list gets "polluted" with unused flags.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE STARTTLS AUTH=PLAIN] uc.vodafone.de Mailservices ready. AA login user notmypass AA OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH QUOTA] Logged in A0 SELECT inbox
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk Junk)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk Junk \*)] Flags permitted.
- 3805 EXISTS
- 0 RECENT
- OK [UNSEEN 1] First unseen.
- OK [UIDVALIDITY 1260979519] UIDs valid
- OK [UIDNEXT 4465] Predicted next UID
- OK [HIGHESTMODSEQ 1] Highest A0 OK [READ-WRITE] Select completed. A1 STORE 1 +FLAGS (testflag)
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk Junk testflag)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk Junk testflag \*)] Flags permitted.
- 1 FETCH (FLAGS (Junk testflag)) A1 OK Store completed. A2 SEARCH KEYWORD testflag
- SEARCH 1 A2 OK Search completed (0.043 secs). A3 STORE 1 -FLAGS (testflag)
- 1 FETCH (FLAGS (Junk)) A3 OK Store completed. A4 select inbox
- OK [CLOSED] Previous mailbox closed.
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk Junk testflag)
- OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft NonJunk Junk testflag \*)] Flags permitted.
- 3805 EXISTS
- 0 RECENT
- OK [UNSEEN 1] First unseen.
- OK [UIDVALIDITY 1260979519] UIDs valid
- OK [UIDNEXT 4465] Predicted next UID
- OK [HIGHESTMODSEQ 1] Highest A4 OK [READ-WRITE] Select completed.
So the new testflag keyword is now in the list even across logins.
Regards, Oliver Eales
On Thu, 2010-03-25 at 22:32 +0100, Oliver Eales wrote:
first of all i am not sure wheter this is a correct behavior according to the RFC or not...
Problem is, when i set a new custom permanent flag (e.g. testflag) and remove it afterwards, the flag still stays in the list of the permanent flags of this drawer even if there are no messages left with this flag set. So the keyword list gets "polluted" with unused flags.
This is pretty much the expected behavior. I've thought about this before though and there are a few things related to this in my TODO list:
- After reaching a certain number of keywords, the oldest unused ones should be removed. Especially with Maildir where the limit is 26, but perhaps others could also try to avoid allocating extra bytes for them in index file.
- Maybe instead of, or in addition to the above, remove keywords automatically that haven't been used for n days.
- Add a way to explicitly add/remove keywords (IMAP extension?)
All of these are pretty low priority for me though..
Am 27.03.2010 um 03:17 schrieb Timo Sirainen:
This is pretty much the expected behavior. I've thought about this before though and there are a few things related to this in my TODO list:
Hello Timo, thanks for the answer. The reason for my question was, that we are working on a webmail frontend where we want to present the user a dropdown menu with his used keywords. For that we considered just using the keywords in the server response when selecting a folder. I think as a workaround we will have to add an additional search for each keyword.
- After reaching a certain number of keywords, the oldest unused ones should be removed. Especially with Maildir where the limit is 26, but perhaps others could also try to avoid allocating extra bytes for them in index file.
- Maybe instead of, or in addition to the above, remove keywords automatically that haven't been used for n days.
- Add a way to explicitly add/remove keywords (IMAP extension?)
That is what i was looking for while reading the RFCs and didn't find anything.
Thanks, Oliver Eales
On Sun, 2010-03-28 at 13:17 +0200, Oliver Eales wrote:
Am 27.03.2010 um 03:17 schrieb Timo Sirainen:
This is pretty much the expected behavior. I've thought about this before though and there are a few things related to this in my TODO list:
Hello Timo, thanks for the answer. The reason for my question was, that we are working on a webmail frontend where we want to present the user a dropdown menu with his used keywords.
That's actually also a reason why immediately removing unused keywords isn't necessarily good. User might want to have a list of keywords, but not necessarily always have all of them used. For example "todo" keyword might be used only sometimes. (I'm assuming that the list can also be used to easily assign keywords to mails.)
- After reaching a certain number of keywords, the oldest unused ones should be removed. Especially with Maildir where the limit is 26, but perhaps others could also try to avoid allocating extra bytes for them in index file.
- Maybe instead of, or in addition to the above, remove keywords automatically that haven't been used for n days.
- Add a way to explicitly add/remove keywords (IMAP extension?)
That is what i was looking for while reading the RFCs and didn't find anything.
Yeah. There's nothing about that. I once talked about an extension that supported KEYWORD ADD/REMOVE commands, but nothing came of it.
participants (2)
-
Oliver Eales
-
Timo Sirainen