From: Timo Sirainen Date: Mon, 4 Sep 2017 13:59:52 +0000 (+0300) Subject: lib-storage: Remove INBOX notification checks if mailbox events aren't requested X-Git-Tag: 2.3.0.rc1~1112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=921a1eac5bd1375b86f5fc423257513c9e94c3cd;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Remove INBOX notification checks if mailbox events aren't requested Nothing would be done with the results of those checks. Note that MAILBOX_LIST_NOTIFY_UIDVALIDITY can be handled using mailbox list index, even for INBOX with mailbox_list_index_include_inbox=no. --- diff --git a/src/lib-storage/list/mailbox-list-index-notify.c b/src/lib-storage/list/mailbox-list-index-notify.c index 33c3172fdd..06048e14b7 100644 --- a/src/lib-storage/list/mailbox-list-index-notify.c +++ b/src/lib-storage/list/mailbox-list-index-notify.c @@ -105,6 +105,8 @@ int mailbox_list_index_notify_init(struct mailbox_list *list, /* INBOX can be handled also using mailbox list index */ } else if ((list->ns->flags & NAMESPACE_FLAG_INBOX_ANY) == 0) { /* no INBOX in this namespace */ + } else if ((mask & MAILBOX_LIST_NOTIFY_STATUS) == 0) { + /* not interested in mailbox changes */ } else if (mailbox_list_get_path(list, "INBOX", MAILBOX_LIST_PATH_TYPE_INDEX, &index_dir) <= 0) { /* no indexes for INBOX? can't handle it */