dovecot-2.1: imapc: When remote IMAP server becomes confused, do...

dovecot at dovecot.org dovecot at dovecot.org
Tue Sep 20 16:44:43 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/1dcc1ebe9516
changeset: 13525:1dcc1ebe9516
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 20 16:42:58 2011 +0300
description:
imapc: When remote IMAP server becomes confused, don't mark our indexes corrupted.
Mark them corrupted only when after a reconnection the initial mailbox sync
doesn't work.

diffstat:

 src/lib-storage/index/imapc/imapc-mailbox.c |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 501b33c4aa28 -r 1dcc1ebe9516 src/lib-storage/index/imapc/imapc-mailbox.c
--- a/src/lib-storage/index/imapc/imapc-mailbox.c	Tue Sep 20 15:36:39 2011 +0300
+++ b/src/lib-storage/index/imapc/imapc-mailbox.c	Tue Sep 20 16:42:58 2011 +0300
@@ -22,7 +22,14 @@
 		mbox->box.name, t_strdup_vprintf(reason, va));
 	va_end(va);
 
-	mail_index_mark_corrupted(mbox->box.index);
+	if (!mbox->initial_sync_done) {
+		/* we failed during initial sync. need to rebuild indexes if
+		   we want to get this fixed */
+		mail_index_mark_corrupted(mbox->box.index);
+	} else {
+		/* maybe the remote server is buggy and has become confused.
+		   try reconnecting. */
+	}
 	imapc_client_mailbox_disconnect(mbox->client_box);
 }
 


More information about the dovecot-cvs mailing list