Mercurial > dovecot > core-2.2
changeset 18908:b51dfee18fd2
pop3-migration: Show the first message's number and UIDL which wasn't found from IMAP.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 14 Jul 2015 15:08:24 +0200 |
parents | 46cbde67f50b |
children | ab441df52e86 |
files | src/plugins/pop3-migration/pop3-migration-plugin.c |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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); }