]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
STORE: Ignore flag changes for read-only (especially EXAMINEd) mailboxes.
authorTimo Sirainen <tss@iki.fi>
Sun, 30 Mar 2008 08:57:57 +0000 (11:57 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 30 Mar 2008 08:57:57 +0000 (11:57 +0300)
--HG--
branch : HEAD

src/imap/cmd-store.c

index 308daffd4b0fc3d4ae47e12206164a36fb2cca0f..44f3c2cde996ac3873c3c8bec12ab8eb943dad3f 100644 (file)
@@ -86,6 +86,12 @@ bool cmd_store(struct client_command_context *cmd)
        if (search_arg == NULL)
                return TRUE;
 
+       if (mailbox_is_readonly(box)) {
+               return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FAST |
+                               (cmd->uid ? 0 : MAILBOX_SYNC_FLAG_NO_EXPUNGES),
+                               0, "OK Store ignored with read-only mailbox.");
+       }
+
        t = mailbox_transaction_begin(box, !silent ? 0 :
                                      MAILBOX_TRANSACTION_FLAG_HIDE);
        if (keywords_list == NULL && modify_type != MODIFY_REPLACE)