diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index 43d52b5985..02beaa6e45 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -880,6 +880,8 @@ bool mailbox_is_autocreated(struct mailbox *box) { if (box->inbox_user) return TRUE; + if ((box->flags & MAILBOX_FLAG_AUTO_CREATE) != 0) + return TRUE; return box->set != NULL && strcmp(box->set->autocreate, MAILBOX_SET_AUTO_NO) != 0; } diff --git a/src/lib-storage/mail-storage.h b/src/lib-storage/mail-storage.h index 85ad9e6f22..830dbe5f19 100644 --- a/src/lib-storage/mail-storage.h +++ b/src/lib-storage/mail-storage.h @@ -61,6 +61,8 @@ enum mailbox_flags { The backend shouldn't treat it as corruption if a mail body isn't found. */ MAILBOX_FLAG_USE_STUBS = 0x800, + /* Mailbox is created implicitly if it does not exist. */ + MAILBOX_FLAG_AUTO_CREATE = 0x1000, }; enum mailbox_feature {