]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3-migration: Use LIST instead of RETRs to get the messages' sizes.
authorTimo Sirainen <tss@iki.fi>
Thu, 16 Jul 2015 15:10:12 +0000 (18:10 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 16 Jul 2015 15:10:12 +0000 (18:10 +0300)
src/plugins/pop3-migration/pop3-migration-plugin.c

index 291665eb999d5e8de558249462a48bbffefb92b7..407b51e845030d8d0df90069af2d4bf812e6990a 100644 (file)
@@ -290,6 +290,9 @@ static int pop3_map_read(struct mail_storage *storage, struct mailbox *pop3_box)
        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) {
                        i_error("pop3_migration: Failed to get size for msg %u: %s",
                                mail->seq,