dovecot-2.2: imapc: After auth failed, return failure immediatel...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 23 10:38:57 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/d64fbe56a742
changeset: 18452:d64fbe56a742
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 23 13:37:22 2015 +0300
description:
imapc: After auth failed, return failure immediately when opening a mailbox.
Instead of trying to re-authenticate which again will most likely fail.
Based on patch by Michael M Slusarz

diffstat:

 src/lib-storage/index/imapc/imapc-storage.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r de2023e630cb -r d64fbe56a742 src/lib-storage/index/imapc/imapc-storage.c
--- a/src/lib-storage/index/imapc/imapc-storage.c	Thu Apr 23 13:27:17 2015 +0300
+++ b/src/lib-storage/index/imapc/imapc-storage.c	Thu Apr 23 13:37:22 2015 +0300
@@ -509,6 +509,12 @@
 
 	i_assert(mbox->client_box == NULL);
 
+	/* If authentication failed, don't check again. */
+	if (mbox->storage->client->auth_failed) {
+		mail_storage_set_internal_error(&mbox->storage->storage);
+		return -1;
+	}
+
 	mbox->client_box =
 		imapc_client_mailbox_open(mbox->storage->client->client, mbox);
 	imapc_client_mailbox_set_reopen_cb(mbox->client_box,


More information about the dovecot-cvs mailing list