]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fix -I max-size to actually be the max-size rather than min-size
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 1 Dec 2021 12:46:04 +0000 (14:46 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 3 Dec 2021 07:16:20 +0000 (07:16 +0000)
The -I max-size parameter was supposed to be used to skip mails that are
larger than max-size. Instead, it skipped mails that were smaller.

src/doveadm/dsync/dsync-mailbox-import.c

index 751dc2389c4a086569d4e3a05e1c731549e1ad55..77552ebb76ea9062d3da6a5012b1ad6035d12b3a 100644 (file)
@@ -1382,7 +1382,7 @@ dsync_mailbox_import_want_change(struct dsync_mailbox_importer *importer,
        }
        if (importer->sync_max_size > 0) {
                i_assert(change->virtual_size != UOFF_T_MAX);
-               if (change->virtual_size < importer->sync_max_size) {
+               if (change->virtual_size > importer->sync_max_size) {
                        /* mail is too large - skip it */
                        *result_r = "Ignoring missing local mail with too large size";
                        return FALSE;