changeset 19672:e7849490acd9

pop3-migration: Fix to 5407a86 - don't sync POP3 UIDLs when we don't need to
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 28 Jan 2016 20:16:31 +0200
parents 3b516415a5fa
children f22a6d0198c4
files src/plugins/pop3-migration/pop3-migration-plugin.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/pop3-migration/pop3-migration-plugin.c	Thu Jan 28 19:56:38 2016 +0200
+++ b/src/plugins/pop3-migration/pop3-migration-plugin.c	Thu Jan 28 20:16:31 2016 +0200
@@ -830,9 +830,12 @@
 				   struct mailbox_header_lookup_ctx *wanted_headers)
 {
 	struct pop3_migration_mailbox *mbox = POP3_MIGRATION_CONTEXT(t->box);
+	struct pop3_migration_mail_storage *mstorage =
+		POP3_MIGRATION_CONTEXT(t->box->storage);
 
 	if ((wanted_fields & (MAIL_FETCH_UIDL_BACKEND |
-			      MAIL_FETCH_POP3_ORDER)) != 0) {
+			      MAIL_FETCH_POP3_ORDER)) != 0 &&
+	    (mstorage->all_mailboxes || t->box->inbox_user)) {
 		/* Start POP3 UIDL syncing before the search, so we'll do it
 		   before we start sending any FETCH BODY[]s to IMAP. It
 		   shouldn't matter much, except this works around a bug in