# HG changeset patch # User Timo Sirainen # Date 1453645709 -7200 # Node ID af9448bcbfd93af84fbdf41a9f082c346a73f3c2 # Parent 152ed3cd2bad4869ef688e9ec65483043349b6ce pop3-migration: When failing because some messages couldn't be matched, show the first message's number and UIDL This was already being done for the warning message when pop3_migration_ignore_missing_uidls was set, but not for the error message when it wasn't set. diff -r 152ed3cd2bad -r af9448bcbfd9 src/plugins/pop3-migration/pop3-migration-plugin.c --- a/src/plugins/pop3-migration/pop3-migration-plugin.c Sun Jan 24 16:27:21 2016 +0200 +++ b/src/plugins/pop3-migration/pop3-migration-plugin.c Sun Jan 24 16:28:29 2016 +0200 @@ -4,6 +4,7 @@ #include "array.h" #include "istream.h" #include "istream-header-filter.h" +#include "str.h" #include "sha1.h" #include "message-size.h" #include "message-header-parser.h" @@ -564,18 +565,19 @@ } } if (missing_uids_count > 0 && !mstorage->all_mailboxes) { + string_t *str = t_str_new(128); + + str_printfa(str, "pop3_migration: %u POP3 messages have no " + "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); if (!mstorage->ignore_missing_uidls) { - i_error("pop3_migration: %u POP3 messages have no " - "matching IMAP messages (set " - "pop3_migration_ignore_missing_uidls=yes " - "to continue anyway)", missing_uids_count); + i_error("%s - set pop3_migration_ignore_missing_uidls=yes to continue anyway", + str_c(str)); return -1; } - i_warning("pop3_migration: %u POP3 messages have no " - "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); + i_warning("%s", str_c(str)); } else if (box->storage->user->mail_debug) { i_debug("pop3_migration: %u mails matched by headers", pop3_count); }