From: Timo Sirainen Date: Wed, 12 Jun 2019 07:58:37 +0000 (+0300) Subject: lib-storage: Sync mailbox after autoexpunging X-Git-Tag: 2.3.7~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9653e1e3b245fecbe28ec50f557ddbb075742510;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Sync mailbox after autoexpunging This actually finishes expunging the mails. Previously the mails were just marked to be expunged in the transaction log, and the next session that opened the mailbox finished the expunging. --- diff --git a/src/lib-storage/mail-autoexpunge.c b/src/lib-storage/mail-autoexpunge.c index de6c31b955..11740c3c2d 100644 --- a/src/lib-storage/mail-autoexpunge.c +++ b/src/lib-storage/mail-autoexpunge.c @@ -124,8 +124,11 @@ mailbox_autoexpunge(struct mailbox *box, unsigned int interval_time, mail_free(&mail); if (mailbox_transaction_commit(&t) < 0) ret = -1; - else + else if (count > 0) { + if (mailbox_sync(box, 0) < 0) + ret = -1; *expunged_count += count; + } return ret; }