[dev] Fwd: Bug #21168 [Opn->WFx]: imap_search() does not support
the OR keyword
Michael M Slusarz
slusarz at bigworm.colorado.edu
Mon Jun 16 14:44:35 PDT 2003
----- Forwarded message from php-bugs at lists.php.net -----
Date: 16 Jun 2003 21:35:16 -0000
From: PHP Bug Database <php-bugs at lists.php.net>
Reply-To: PHP Bug Database <php-bugs at lists.php.net>
Subject: Bug #21168 [Opn->WFx]: imap_search() does not support the OR
keyword
To: slusarz at colorado.edu
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at
http://bugs.php.net/?id=21168&edit=2
ID: 21168
Updated by: iliaa at php.net
Reported By: slusarz at colorado dot edu
-Status: Open
+Status: Wont fix
Bug Type: IMAP related
Operating System: RedHat Linux 8.0
PHP Version: 4.3.0RC4
New Comment:
This is really not a php problem to solve, PHP uses mail_criteria(), an
imap function used to determine the nature of the search.
Unfortunately, this function only supports IMAP2 functionality and does
not support IMAP4 directives, which is what prevents you from using OR
keyword.
Until the author of c-client decided to introduce mail_criteria()
equivalent that supports IMAP4 don't expect to see OR keyword support
in PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-12-23 19:00:02] slusarz at colorado dot edu
I sent this to Dan in August and haven't seen anything done about it
yet, so I will put it here. Note that the c-client DOES support the OR
keyword (see the MARC article listed below) - it appears that PHP is
not configuring the search correctly to use the keyword though.
-----
Quoting Dan Kalowsky <dank at deadmime.org>:
| Hi there,
|
| Jon Pairse has given me your email regarding a commit you did on the
IMP
| project for HORDE. Not being very familiar with IMP, any chance you
can
| give me a sample piece of PHP code for what doesn't work with the
| imap_search() function in PHP?
|
| I'll see if I can get that fixed for 4.3.0
For imap_search() code, go to:
http://cvs.horde.org/co.php/imp/lib/Filter.php?login=2&r=1.20
The code is in the _matchFilter() method. It generates a search query
that
looks like the following:
UNDELETED OR FIELD1 "FOOBAR1" OR FIELD2 "FOOBAR2" FIELD3 "FOOBAR3"
Running this query directly on my imap installation (courier-imap 1.5),
it
correctly does an OR search on FIELD1, FIELD2, FIELD3. This search
returns
no results in PHP on the same mailbox.
My lame attempt to figure out the problem can be found here:
http://marc.theaimsgroup.com/?l=imp&m=102832554619977&w=2
-----
------------------------------------------------------------------------
----- End forwarded message -----
______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder
More information about the dev
mailing list