From: Timo Sirainen Date: Thu, 8 May 2003 11:30:32 +0000 (+0300) Subject: EXPUNGE should reply OK even if mailbox is read-only. STORE should use X-Git-Tag: 1.1.alpha1~4656 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4780fe10ba78e616bbee1215bf452d6a7fd3ef7e;p=thirdparty%2Fdovecot%2Fcore.git EXPUNGE should reply OK even if mailbox is read-only. STORE should use per-session flags, but we'll leave it as FIXME for now.. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/index-expunge.c b/src/lib-storage/index/index-expunge.c index 6ccdbf22bf..1b475617da 100644 --- a/src/lib-storage/index/index-expunge.c +++ b/src/lib-storage/index/index-expunge.c @@ -68,8 +68,11 @@ int index_storage_expunge(struct mailbox *box, int notify) int failed; if (box->readonly) { - mail_storage_set_error(box->storage, "Mailbox is read-only"); - return FALSE; + box->storage->callbacks-> + notify_no(&ibox->box, + "Mailbox is read-only, ignoring expunge", + box->storage->callback_context); + return TRUE; } if (!index_storage_lock(ibox, MAIL_LOCK_EXCLUSIVE)) diff --git a/src/lib-storage/index/index-update-flags.c b/src/lib-storage/index/index-update-flags.c index 573f97d0e2..29e833dd3a 100644 --- a/src/lib-storage/index/index-update-flags.c +++ b/src/lib-storage/index/index-update-flags.c @@ -67,6 +67,7 @@ int index_storage_update_flags(struct mailbox *box, const char *messageset, int ret, ret2; if (box->readonly) { + /* FIXME: we should use memory */ mail_storage_set_error(box->storage, "Mailbox is read-only"); return FALSE; }