From: Timo Sirainen Date: Wed, 1 Dec 2021 12:46:04 +0000 (+0200) Subject: dsync: Fix -I max-size to actually be the max-size rather than min-size X-Git-Tag: 2.3.17.1~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0c9435763ffb7bcbccda48bf326b857b62e56e50;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fix -I max-size to actually be the max-size rather than min-size 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. --- diff --git a/src/doveadm/dsync/dsync-mailbox-import.c b/src/doveadm/dsync/dsync-mailbox-import.c index 751dc2389c..77552ebb76 100644 --- a/src/doveadm/dsync/dsync-mailbox-import.c +++ b/src/doveadm/dsync/dsync-mailbox-import.c @@ -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;