Dovecot index schema migration lacking transactional rollback mechanism
0 reputation · 23 Jun 2021, 21:14 UTC
Dovecot utilizes specialized index formats for Maildir and mbox storage that undergo schema changes during configuration updates or software upgrades. When a version mismatch is detected, the service typically invalidates existing index files to force a rebuild from the raw mail store.
Currently, there is no native transactional rollback or snapshotting mechanism for these index files. Once an index is upgraded to a newer version format, the previous format files become incompatible with older software versions. This presents a risk of metadata inconsistency if a large-scale rebuild is interrupted, potentially leaving the indices in a corrupted state that requires manual deletion of metadata files.
Is there a configuration parameter to enable automated backup of the index state before a schema migration is triggered? Can Dovecot be configured to revert to the previous index format automatically if the rebuild process fails or is interrupted?