X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fimap_search.c;h=351d16f9da0bb72780fc3c905df04259969d86d0;hb=0fe98a70f77338333359eb7963a45a16e0ebaf03;hp=8141ff7f18b4dd25c0253985a3c46ed3bf1b5837;hpb=28ad3382f2ad7f6d83c418087b4e27dca985657c;p=citadel.git diff --git a/citadel/imap_search.c b/citadel/imap_search.c index 8141ff7f1..351d16f9d 100644 --- a/citadel/imap_search.c +++ b/citadel/imap_search.c @@ -69,6 +69,7 @@ int imap_do_search_msg(int seq, struct CtdlMessage *msg, int is_or = 0; int pos = 0; int i; + char *fieldptr; if (num_items == 0) return(0); @@ -101,7 +102,13 @@ int imap_do_search_msg(int seq, struct CtdlMessage *msg, } else if (!strcasecmp(itemlist[pos], "BCC")) { - /* FIXME */ + fieldptr = rfc822_fetch_field(msg->cm_fields['M'], "Bcc"); + if (fieldptr != NULL) { + if (bmstrstr(fieldptr, itemlist[pos+1], strncasecmp)) { + match = 1; + } + phree(fieldptr); + } pos += 2; } @@ -123,7 +130,13 @@ int imap_do_search_msg(int seq, struct CtdlMessage *msg, } else if (!strcasecmp(itemlist[pos], "CC")) { - /* FIXME */ + fieldptr = rfc822_fetch_field(msg->cm_fields['M'], "Cc"); + if (fieldptr != NULL) { + if (bmstrstr(fieldptr, itemlist[pos+1], strncasecmp)) { + match = 1; + } + phree(fieldptr); + } pos += 2; }