Implements checking whether a mailbox has a particular special-use flag.
return box->inbox_any;
}
+bool mailbox_has_special_use(struct mailbox *box, const char *special_use)
+{
+ if (box->set == NULL)
+ return FALSE;
+ return str_contains_special_use(box->set->special_use, special_use);
+}
+
static void mailbox_copy_cache_decisions_from_inbox(struct mailbox *box)
{
struct mail_namespace *ns =
/* Returns TRUE if the mailbox is user's INBOX or another user's shared INBOX */
bool mailbox_is_any_inbox(struct mailbox *box);
+/* Returns TRUE if the mailbox has the specified special use flag assigned. */
+bool mailbox_has_special_use(struct mailbox *box, const char *special_use);
+
/* Change mailbox_verify_create_name() to not verify new mailbox name
restrictions (but still check that it's a valid existing name). This is
mainly used by dsync to make sure the sync works even though the original