Mikhail Ramendik wrote:
Hello,
I reviewed dbsearch.c to find out whether one could quickly replace
db_fetch_headerws with db_get_main_header for header searches.
And here is the part I do not understand:
/* no match found yet, try the children */
el = list_getstart(&msg->children);
while (el) {
if (db_exec_search
((mime_message_t *) el->data, sk, msg_idnr) == 1)
return 1;
el = el->nextnode;
}
This is the only part that, in case of a header search, uses the data
from more than just the header. What is this for? Why do we have to
search "children"?
This searches all mimeparts in multipart messages. Looking at the code and the
rfc this appears to be overkill. Subparts only have to be searched when they are
mimetype text or message. But even than: do we really want to match messages in
a digest that match a given envelope search criterium such as cc, from, date, etc.
Shouldn't we restrict this looping over subparts to TEXT or BODY type searches.
In that case, with header-searches we can safely skip looping over subparts.
--
________________________________________________________________
Paul Stevens [EMAIL PROTECTED]
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl