{
struct mail_user *user = ctx->mbox->storage->storage.user;
struct virtual_backend_box *bbox;
+ bool no_wildcards = FALSE;
if (*line == ' ' || *line == '\t') {
/* continues the previous search rule */
bbox->name++;
bbox->negative_match = TRUE;
break;
- }
-
- if (strchr(bbox->name, '*') != NULL ||
- strchr(bbox->name, '%') != NULL) {
- bbox->glob = imap_match_init(ctx->pool, bbox->name, TRUE, ctx->sep);
- ctx->have_wildcards = TRUE;
- } else if (bbox->name[0] == '!') {
+ case '!':
/* save messages here */
if (ctx->mbox->save_bbox != NULL) {
*error_r = "Multiple save mailboxes defined";
}
bbox->name++;
ctx->mbox->save_bbox = bbox;
+ no_wildcards = TRUE;
+ break;
+ }
+
+ if (!no_wildcards &&
+ (strchr(bbox->name, '*') != NULL ||
+ strchr(bbox->name, '%') != NULL)) {
+ bbox->glob = imap_match_init(ctx->pool, bbox->name, TRUE, ctx->sep);
+ ctx->have_wildcards = TRUE;
}
/* now that the prefix characters have been processed,
find the namespace */