dovecot-2.2: pop3-migration: Show the first message's number and...

dovecot at dovecot.org dovecot at dovecot.org
Tue Jul 14 13:08:36 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/b51dfee18fd2
changeset: 18908:b51dfee18fd2
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 14 15:08:24 2015 +0200
description:
pop3-migration: Show the first message's number and UIDL which wasn't found from IMAP.

diffstat:

 src/plugins/pop3-migration/pop3-migration-plugin.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 46cbde67f50b -r b51dfee18fd2 src/plugins/pop3-migration/pop3-migration-plugin.c
--- a/src/plugins/pop3-migration/pop3-migration-plugin.c	Sat Jul 11 12:16:56 2015 +0300
+++ b/src/plugins/pop3-migration/pop3-migration-plugin.c	Tue Jul 14 15:08:24 2015 +0200
@@ -470,6 +470,7 @@
 	struct imap_msg_map *imap_map;
 	unsigned int pop3_idx, imap_idx, pop3_count, imap_count;
 	unsigned int first_seq, missing_uids_count;
+	uint32_t first_missing_idx = (uint32_t)-1;
 	int ret;
 
 	first_seq = mbox->first_unfound_idx+1;
@@ -512,8 +513,11 @@
 	}
 	missing_uids_count = 0;
 	for (pop3_idx = 0; pop3_idx < pop3_count; pop3_idx++) {
-		if (pop3_map[pop3_idx].imap_uid == 0)
+		if (pop3_map[pop3_idx].imap_uid == 0) {
+			if (first_missing_idx == (uint32_t)-1)
+				first_missing_idx = pop3_map[pop3_idx].pop3_seq;
 			missing_uids_count++;
+		}
 	}
 	if (missing_uids_count > 0 && !mstorage->all_mailboxes) {
 		if (!mstorage->ignore_missing_uidls) {
@@ -524,7 +528,10 @@
 			return -1;
 		}
 		i_warning("pop3_migration: %u POP3 messages have no "
-			  "matching IMAP messages", missing_uids_count);
+			  "matching IMAP messages (first POP3 msg %u UIDL %s)",
+			  missing_uids_count,
+			  pop3_map[first_missing_idx].pop3_seq,
+			  pop3_map[first_missing_idx].pop3_uidl);
 	} else if (box->storage->user->mail_debug) {
 		i_debug("pop3_migration: %u mails matched by headers", pop3_count);
 	}


More information about the dovecot-cvs mailing list