On Thu, Dec 11, 2008 at 04:39:33PM +0200, Timo Sirainen wrote:
On Thu, 2008-12-11 at 09:24 +0100, Adrian Reber wrote:
On Wed, Dec 10, 2008 at 08:28:20PM +0100, Adrian Reber wrote:
Does an option like "pop3_no_flag_updates = yes" also exist for imap? Is it maybe planned? Or should I just provide a patch?
Attached is a patch which adds the config option "imap_no_flag_updates".
The reason I am interested in this feature is that I do not want "Status: O" added to all my new mails by the IMAP server, because if I access the mailbox directly all my new mails are "Old" and I would like them to stay "New".
In the patch I just copied all the parts "pop3_no_flag_updates" touches to the corresponding imap parts. I hope I have not messed it up too much.
The patch looks ok otherwise, except using it will cause your server to violate IMAP RFC because \Recent flags aren't dropped then. So I'm not going to add this to standard Dovecot distribution.
An alternative to patching would be for you to create a plugin that hooks into mail_storage.mailbox_open() and adds the MAILBOX_OPEN_READONLY flag before calling super.mailbox_open(). See e.g. mail_log plugin for an example.
Ah, okay. I assume it is possible to develop a plugin which is completely outside of the main source tree and just uses the public interfaces. Right?
Adrian