Use it if the remote server advertises SEARCH=X-MIMEPART or SEARCH=MIMEPART.
{ "SORT", IMAPC_CAPABILITY_SORT },
{ "ESORT", IMAPC_CAPABILITY_ESORT },
{ "SORT=DISPLAY", IMAPC_CAPABILITY_SORT_DISPLAY },
+ { "SEARCH=MIMEPART", IMAPC_CAPABILITY_SEARCH_MIMEPART },
+ { "SEARCH=X-MIMEPART", IMAPC_CAPABILITY_SEARCH_MIMEPART },
{ "IMAP4REV1", IMAPC_CAPABILITY_IMAP4REV1 },
{ "IMAP4REV2", IMAPC_CAPABILITY_IMAP4REV2 },
IMAPC_CAPABILITY_SORT = 0x20000,
IMAPC_CAPABILITY_ESORT = 0x40000,
IMAPC_CAPABILITY_SORT_DISPLAY = 0x100000,
+ IMAPC_CAPABILITY_SEARCH_MIMEPART= 0x200000,
IMAPC_CAPABILITY_IMAP4REV2 = 0x20000000,
IMAPC_CAPABILITY_IMAP4REV1 = 0x40000000,
case SEARCH_MAILBOX_GUID:
case SEARCH_MAILBOX_GLOB:
case SEARCH_REAL_UID:
- case SEARCH_MIMEPART:
/* not supported for now */
break;
+ case SEARCH_MIMEPART:
+ if ((mbox->capabilities & IMAPC_CAPABILITY_SEARCH_MIMEPART) == 0)
+ return FALSE;
+ return mail_search_arg_to_imap(str, arg, &error);
}
return FALSE;
}