6.0.0-beta6
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
4/10/26
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#1368] header and searchMailbox bug (lib/Horde/IMAP/Search.php)
*
Your Email Address
*
Spam protection
Enter the letters below:
. .. ..__ .__..__. | ||\ |[__)[__][__] |__|| \|| \| || |
Comment
> I am trying to make a filter rule in ingo that is producing buggy > results. The logic in ingo looks correct but, searchMailbox is not > returning the correct result. > > > > My rule: Match all of the following, Self defined header > 'X-Virus-Scanned', Doesn't contain 'huyler.net', deliver to Junk. > This rule will bring you into line 227 of ingo/lib/Script/imap.php: > > > > line 227: $ob->header($val['field'], $val['value'], true); > > line 230: $search_array[] = &$ob; > > line 234: $query->imapAnd($search_array); > > line 239: $indices = $imap_search->searchMailbox($query, > $params['imap'], $params['mailbox']); > > > > Because 'X-Virus-Scanned' is not a standard header, the header > function (line 448 of lib/Horde/IMAP/Search.php) will set > _extendedSearch instead of _query. On line 497, $_not is set > correctly. However, when we call searchMailbox, the build function > (line 406 of Search.php) sets 'not' to false because _query is empty. > > > > The result: the 'not' flag does not work for non-standard headers. > > > > As a test, I commented out line 418. This did not completely solve > the problem. It then returns all messages that have > 'X-Virus-Scanned' but the header does not match my search string. > Messages that do not have the header at all should also be returned.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers