]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3-migration: Fetch physical sizes instead of virtual sizes so pop3c uses LIST
authorTimo Sirainen <tss@iki.fi>
Thu, 16 Jul 2015 16:37:22 +0000 (19:37 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 16 Jul 2015 16:37:22 +0000 (19:37 +0300)
4bebfbb32410 caused the fetching to break entirely.

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

index 407b51e845030d8d0df90069af2d4bf812e6990a..db13f2ff284eda8cd7cd3390ccf092cb45d698da 100644 (file)
@@ -286,14 +286,14 @@ static int pop3_map_read(struct mail_storage *storage, struct mailbox *pop3_box)
        search_args = mail_search_build_init();
        mail_search_build_add_all(search_args);
        ctx = mailbox_search_init(t, search_args, NULL,
-                                 MAIL_FETCH_VIRTUAL_SIZE, NULL);
+                                 MAIL_FETCH_PHYSICAL_SIZE, NULL);
        mail_search_args_unref(&search_args);
 
        while (mailbox_search_next(ctx, &mail)) {
                /* get the size with LIST instead of RETR */
                mail->lookup_abort = MAIL_LOOKUP_ABORT_READ_MAIL;
 
-               if (mail_get_virtual_size(mail, &size) < 0) {
+               if (mail_get_physical_size(mail, &size) < 0) {
                        i_error("pop3_migration: Failed to get size for msg %u: %s",
                                mail->seq,
                                mailbox_get_last_error(pop3_box, NULL));