Edit report at http://bugs.php.net/bug.php?id=53182&edit=1
ID: 53182 Comment by: dkarp at zimbra dot com Reported by: william dot bessat at gmail dot com Summary: imap_search not valid with RFC 3501 (still stuck with IMAPv2) Status: Wont fix Type: Bug Package: IMAP related Operating System: All PHP Version: 5.3.3 Block user comment: N Private report: N New Comment: The IMAP c-client certainly supports UID ranges. This is a PHP issue. SEARCHSET *msgno; a set of message sequence numbers SEARCHSET *uid; a set of unique identifiers http://skull.piratehaven.org/~bapper/imap/mail_search_funcs.html Previous Comments: ------------------------------------------------------------------------ [2010-10-29 12:44:04] ahar...@php.net PHP's IMAP extension simply calls c-client, so it's entirely dependent on what that library supports in terms of search syntax. There's nothing we can really do on the PHP side to help. ------------------------------------------------------------------------ [2010-10-27 21:50:30] william dot bessat at gmail dot com The search string I provided in the example is to fetch all messages where UID>=200. The goal of this search is to keep up to date a webmail, without retriving the whole mailbox content each time you want to synchronize it, since you can't rely on the SEEN/RECENT flag (if the mailbox is opened with another software in the meantime). Using dates to achieve that is a dirty workaround... imap_search() is stuck with the RFC 1176 (august 1990 !!111!!!) PS: Sorry for the triple-post, this is my first bug report and I didn't know we can't edit things. ------------------------------------------------------------------------ [2010-10-27 12:49:28] william dot bessat at gmail dot com There's a typo in the imap_search(), the resource is, of course, before the search string :) ------------------------------------------------------------------------ [2010-10-27 12:45:58] william dot bessat at gmail dot com Description: ------------ Hi, The imap_search function is not compliant with the RFC 3501. We can not search messages using their UID. Example : imap_search("UID 200:*, $link); The output goes in the error_log with this message : [27-Oct-2010 12:34:35] PHP Notice: Unknown: Unknown search criterion: UID (errflg=2) in Unknown on line 0 Imo, this functionnality should be implemented for building advanced webmails. This is not a real *bug*, but more a lack of functionnality. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53182&edit=1