dovecot-1.2: imap: Try to allow STORE for read-only mailboxes, b...

dovecot at dovecot.org dovecot at dovecot.org
Mon Aug 4 22:02:29 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/f7cbcd15ef2c
changeset: 8063:f7cbcd15ef2c
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Aug 04 15:02:19 2008 -0400
description:
imap: Try to allow STORE for read-only mailboxes, but not for EXAMINEd.

diffstat:

3 files changed, 3 insertions(+), 1 deletion(-)
src/imap/client.h     |    1 +
src/imap/cmd-select.c |    1 +
src/imap/cmd-store.c  |    2 +-

diffs (34 lines):

diff -r a69c49565a5b -r f7cbcd15ef2c src/imap/client.h
--- a/src/imap/client.h	Mon Aug 04 13:33:51 2008 -0400
+++ b/src/imap/client.h	Mon Aug 04 15:02:19 2008 -0400
@@ -116,6 +116,7 @@ struct client {
 	unsigned int handling_input:1;
 	unsigned int syncing:1;
 	unsigned int id_logged:1;
+	unsigned int mailbox_examined:1;
 	unsigned int input_skip_line:1; /* skip all the data until we've
 					   found a new line */
 	unsigned int modseqs_sent_since_sync:1;
diff -r a69c49565a5b -r f7cbcd15ef2c src/imap/cmd-select.c
--- a/src/imap/cmd-select.c	Mon Aug 04 13:33:51 2008 -0400
+++ b/src/imap/cmd-select.c	Mon Aug 04 15:02:19 2008 -0400
@@ -279,6 +279,7 @@ select_open(struct imap_select_context *
 
 	client->mailbox = ctx->box;
 	client->select_counter++;
+	client->mailbox_examined = readonly;
 	client->messages_count = status.messages;
 	client->recent_count = status.recent;
 	client->uidvalidity = status.uidvalidity;
diff -r a69c49565a5b -r f7cbcd15ef2c src/imap/cmd-store.c
--- a/src/imap/cmd-store.c	Mon Aug 04 13:33:51 2008 -0400
+++ b/src/imap/cmd-store.c	Mon Aug 04 15:02:19 2008 -0400
@@ -149,7 +149,7 @@ bool cmd_store(struct client_command_con
 	if (!store_parse_args(&ctx, ++args))
 		return TRUE;
 
-	if (mailbox_is_readonly(client->mailbox)) {
+	if (client->mailbox_examined) {
 		if (ctx.max_modseq < (uint64_t)-1)
 			reply = "NO CONDSTORE failed: Mailbox is read-only.";
 		else


More information about the dovecot-cvs mailing list