if (strcasecmp(line, "INBOX") == 0)
line = "INBOX";
bbox->name = p_strdup(ctx->pool, line);
- if (*line == '-' || *line == '!') line++;
+ if (*line == '-' || *line == '+' || *line == '!') line++;
bbox->ns = strcasecmp(line, "INBOX") == 0 ?
mail_namespace_find_inbox(user->namespaces) :
mail_namespace_find(user->namespaces, &line);
bbox->name);
return -1;
}
+ if (bbox->name[0] == '+') {
+ bbox->name++;
+ bbox->clear_recent = TRUE;
+ }
+
if (strchr(bbox->name, '*') != NULL ||
strchr(bbox->name, '%') != NULL) {
name = bbox->name[0] == '-' ? bbox->name + 1 : bbox->name;
i_assert(bbox->box == NULL);
- flags |= MAILBOX_FLAG_KEEP_RECENT;
+ if (!bbox->clear_recent)
+ flags |= MAILBOX_FLAG_KEEP_RECENT;
mailbox = bbox->name;
ns = mail_namespace_find(user->namespaces, &mailbox);
unsigned int sync_seen:1;
unsigned int wildcard:1;
+ unsigned int clear_recent:1;
unsigned int uids_nonsorted:1;
};
ARRAY_DEFINE_TYPE(virtual_backend_box, struct virtual_backend_box *);