With private indexes the \Seen flag is stored locally, so the remote server
doesn't know its current value. Searching e.g. "SEEN SUBJECT foo" passed the
SEEN criteria to the remote server, which evaluated it against a flag that
isn't authoritative, and the result was then used as-is. Leave such flag args
out of the remote query and evaluate them locally.
supported. */
arg2.value.date_type = MAIL_SEARCH_DATE_TYPE_RECEIVED;
}
+ return mail_search_arg_to_imap(str, arg, FALSE, &error);
+ case SEARCH_FLAGS:
+ if ((arg->value.flags &
+ mailbox_get_private_flags_mask(&mbox->box)) != 0) {
+ /* The flag is stored in the private index, which the
+ remote server doesn't know about. Evaluate it
+ locally. */
+ return FALSE;
+ }
/* fall through */
case SEARCH_ALL:
case SEARCH_UIDSET:
- case SEARCH_FLAGS:
case SEARCH_KEYWORDS:
case SEARCH_SMALLER:
case SEARCH_LARGER: