struct mailbox_attribute_iter *iter;
const char *key;
int ret = 0;
+ bool inbox = t->box->inbox_any;
iter = mailbox_attribute_iter_init(t->box, type, "");
while ((key = mailbox_attribute_iter_next(iter)) != NULL) {
+ if (inbox &&
+ strncmp(key, MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER,
+ strlen(MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER)) == 0)
+ continue;
+
if (mailbox_attribute_unset(t, type, key) < 0)
ret = -1;
}
#define MAILBOX_ATTRIBUTE_PREFIX_DOVECOT "vendor/vendor.dovecot/"
/* Prefix used for attributes reserved for Dovecot's internal use. Normal
users cannot access these in any way. */
-#define MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT "vendor/vendor.dovecot/pvt/"
+#define MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT \
+ MAILBOX_ATTRIBUTE_PREFIX_DOVECOT"pvt/"
+/* Prefix used for server attributes in INBOX. INBOX deletion won't delete
+ any attributes under this prefix. */
+#define MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT_SERVER \
+ MAILBOX_ATTRIBUTE_PREFIX_DOVECOT_PVT"server/"
enum mail_attribute_type {
MAIL_ATTRIBUTE_TYPE_PRIVATE,