Plugin to cleanup/remove unused user defined keywords(IMAP PERMANENTFLAGS) possible ?
3 Oct
2023
3 Oct
'23
9:36 p.m.
I found a reference to a similar issues here: https://www.dovecot.org/list/dovecot/2010-March/047925.html
I know IMAP rfc say nothing about removing the keywords/PERMANENTFLAGS (they can only be added https://www.rfc-editor.org/rfc/rfc3501.html#page-64) , therefore I wonder if it is possible to create a Dovecot plugin to accomplish this task ?
Technically it is possible to do now via the following steps:
- Ensure the "unwanted" user defined keyword/flag is remove from all messages in a folder (Folder A)
- Create a temporary folder (Folder A_temp)
- Move all messages from Folder A -> Folder A_temp
- Delete Folder A
- Rename Folder A_temp -> Folder A As you can see this highly inefficient and awkward and even if the unwanted keyword does NOT appear in Folder A anymore , it still can be found in '~/Maildir/dovecot-keywords' file
Alternatively, if it is hard to create a plugin that would remove the keyword for good, would something like this be easier:
- Define a list of "allowed" user defined keywords 1a. Perhaps this list can be defined via METADATA extension on per folder basis
- Reject(or discard) "not allowed" keyword sent via the +FLAGS / +FLAGS.SILENT commands
Any helpful plugin example or code references would be greatly appreciated.
Thank you very much,
Sergey Mosin
408
Age (days ago)
408
Last active (days ago)
0 comments
1 participants
participants (1)
-
sergey@srgdev.com