[dev] proposal for imp/Filter.php unsupported keywords

Igor Stroh stroh@scan-plus.de
17 Aug 2002 16:42:03 +0200


---------------------- multipart/signed attachment
Hi there,

the current implementation of php's imap module does not support several
search criteria that are covered by imapv4 rfc. The problem is the
underlying uw-imap c-client library that can handle only imapv2
searches, so it's pretty difficult to patch php so it does understand
imapv4 searches. One of unsupported criterions is the 'NOT' keyword. The
c-client source is pretty hard to read (even for one of my colleagues
who's a real C-wizard), but it seems, that it's actually possible to run
imap searches that contain the NOT keyword though it's done in a very
strange way (this also applies to the 'OR' keyword)... However, it's not
all too trivial to do such a search, so I guess it still will take some
time for php developers to implement the stuff...
In the mean time, one can trick a bit around and do a 'NOT <criterion>'=20
simply by searching for <criterion> and doing something like
array_diff($found_uids, $all_uids);
This approach is bad, as it introduces a racing condition 'cos it cannot
be run atomically but since there are no other solutiony, this one might
be all right...

Any thoughts?

Greetings,
igor

---------------------- multipart/signed attachment
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://lists.horde.org/archives/dev/attachments/20020817/c18a55a9/attachment.bin

---------------------- multipart/signed attachment--