# The results will be automatically fixed once the folders are opened.
#mailbox_list_index_very_dirty_syncs = yes
+# Should INBOX be kept up-to-date in the mailbox list index? By default it's
+# not, because most of the mailbox accesses will open INBOX anyway.
+#mailbox_list_index_include_inbox = no
+
# The minimum number of mails in a mailbox before updates are done to cache
# file. This allows optimizing Dovecot's behavior to do less disk writes at
# the cost of more disk reads.
struct index_list_storage_module index_list_storage_module =
MODULE_CONTEXT_INIT(&mail_storage_module_register);
-/* Never update the STATUS information for INBOX. INBOX is almost always opened
- anyway, so this just causes extra writes. (Although this could be useful if
- somebody has a lot of other users' shared INBOXes.) */
+/* Should the STATUS information for this mailbox not be written to the
+ mailbox list index? */
#define MAILBOX_IS_NEVER_IN_INDEX(box) \
- ((box)->inbox_any)
+ ((box)->inbox_any && !(box)->storage->set->mailbox_list_index_include_inbox)
static int
index_list_open_view(struct mailbox *box, bool status_check,
DEF(SET_BOOL, mail_nfs_index),
DEF(SET_BOOL, mailbox_list_index),
DEF(SET_BOOL, mailbox_list_index_very_dirty_syncs),
+ DEF(SET_BOOL, mailbox_list_index_include_inbox),
DEF(SET_BOOL, mail_debug),
DEF(SET_BOOL, mail_full_filesystem_access),
DEF(SET_BOOL, maildir_stat_dirs),
.mail_nfs_index = FALSE,
.mailbox_list_index = FALSE,
.mailbox_list_index_very_dirty_syncs = FALSE,
+ .mailbox_list_index_include_inbox = FALSE,
.mail_debug = FALSE,
.mail_full_filesystem_access = FALSE,
.maildir_stat_dirs = FALSE,
bool mail_nfs_index;
bool mailbox_list_index;
bool mailbox_list_index_very_dirty_syncs;
+ bool mailbox_list_index_include_inbox;
bool mail_debug;
bool mail_full_filesystem_access;
bool maildir_stat_dirs;