From: Timo Sirainen Date: Thu, 8 Sep 2016 20:54:22 +0000 (+0300) Subject: lib-index: Make sure new dovecot.index.log files start tracking modseqs. X-Git-Tag: 2.3.0.rc1~3053 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ff03d2244dd08effadfecec365bec28793a1aa0;p=thirdparty%2Fdovecot%2Fcore.git lib-index: Make sure new dovecot.index.log files start tracking modseqs. This will make mail_index_modseq_get_next_log_offset() work correctly even if modseqs haven't been explicitly enabled. --- diff --git a/src/lib-index/mail-transaction-log-file.c b/src/lib-index/mail-transaction-log-file.c index 2e24d7c97d..bf4ff94e6d 100644 --- a/src/lib-index/mail-transaction-log-file.c +++ b/src/lib-index/mail-transaction-log-file.c @@ -251,6 +251,12 @@ mail_transaction_log_init_hdr(struct mail_transaction_log *log, } else { hdr->file_seq = 1; } + if (hdr->initial_modseq == 0) { + /* modseq tracking in log files is required for many reasons + nowadays, even if per-message modseqs aren't enabled in + dovecot.index. */ + hdr->initial_modseq = 1; + } if (log->head != NULL) { /* make sure the sequence always increases to avoid crashes