]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3-migration: Fail if all IMAP mails were matched by size, but POP3 had extra mails
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 4 Sep 2017 16:37:12 +0000 (19:37 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 5 Sep 2017 06:18:20 +0000 (09:18 +0300)
This makes the handling same as what happens when the same situation happens
and the last mails were matched by headers. That's an error, unless
pop3_migration_ignore_*_uidls=yes.

src/plugins/pop3-migration/pop3-migration-plugin.c

index fe18cc1a58eb225b4b30ebec36ce49ca2c2d2380..4f5f877f4cf7344232c0c34c3f85833829794a48 100644 (file)
@@ -688,7 +688,7 @@ static bool pop3_uidl_assign_by_size(struct mailbox *box)
                i_debug("pop3_migration: cached uidls=%u, size matches=%u, total=%u",
                        uidl_match, size_match, count);
        }
-       return i == count;
+       return i == count && imap_count == pop3_count;
 }
 
 static int