Edit report at https://bugs.php.net/bug.php?id=38712&edit=1
ID: 38712 Comment by: michael dot radzewitz at freenet-ag dot de Reported by: benjamin dot podszun at gmail dot com Summary: Add support for CAPABILITY, NAMESPACE etc. Status: Open Type: Feature/Change Request Package: IMAP related Operating System: * PHP Version: 5.3 Block user comment: N Private report: N New Comment: The attached patch works fine for us but you should review the source code to ensure that all the necessary data structures, error checking and return values are setup correctly. As mentioned in the above comment: The c-client library supports the function call on: imap_cap(MAILSTREAM *stream) directly and we just call it *directly*! We don't went through the mail interface in the c-client library (mail.h/mail.c) which does not support an capability function for different drivers. As far as we see - this in some way breaks with the previous php imap implementation because all the other functions went through these mail interface functions. This may also the reason why php does not support it by now. Michael R. Previous Comments: ------------------------------------------------------------------------ [2006-09-15 14:42:49] benjamin dot podszun at gmail dot com Just to make clear that it's not 4.x related or OS dependend.. ------------------------------------------------------------------------ [2006-09-04 20:52:59] tony2...@php.net Missing functionality is not a bug. ------------------------------------------------------------------------ [2006-09-04 20:52:24] benjamin dot podszun at gmail dot com Please reconsider your classification again. php.net/imap links (Section "See also") to the imap RFC (http://www.faqs.org/rfcs/rfc2060). Section 6.1.1 describes the CAPABILITY command, something that the php module just doesn't support/include. Therefor this is a bug in my book, because the (linked/quoted even) RFC is not fully supported. If there are rules for classifying this as FR I'd kindly like to ask you for any hint where I can find them. My point: CAPABILITY is missing. The RFC includes it. Bug in the (not complete) imap implementation/wrapper of PHP. Yes, the second mentioned command is optional.. Last try, Ben ------------------------------------------------------------------------ [2006-09-04 20:30:55] benjamin dot podszun at gmail dot com No offense, but you're probably not reading the report right. I cannot provide a script that demonstrate that PHP is lacking support for functions. It would be empty. Trying to be more clear about this: php.net/imap lists lots of methods. It doesn't list (and the source lacks..) methods that wrap the imap command CAPABILITY and the imap command NAMESPACE (caps, because they are used like this in the RFC). Since the underlying c-client library, that provides the current imap implementation for php, supports these commands (I checked the source for that) I hereby ask php to include these commands into the php imap module. While the NAMESPACE command is optional (and therefor more or less a feature request) the CAPABILITY command is part of the RFC that php.net/imap links to. It's part of common imap support. There should be a wrapper in php. Since there _is_ no wrapper I cannot provide a script that reproduces the problem. I hope I provided enough feedback to get this back on track. ------------------------------------------------------------------------ [2006-09-04 11:57:57] benjamin dot podszun at gmail dot com Description: ------------ The current imap modules fails to wrap methods to query for the server capabilities and the server namespace. This is crucial for some servers like courier-imap with virtual shared folders, since those end up in a different namespace and cannot be found without support for both CAPABILITY and NAMESPACE imap support. Reproduce code: --------------- IMAP source transcript to show the "right way" that php should offer as well: Transcript on my server: a001 capability * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION a001 OK CAPABILITY completed -> My server supports "namespace", which is exactly what I want/need to use a002 namespace * NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." ".")) a002 OK NAMESPACE completed. -> As you can see the server supports both "shared." and "#shared" for shared folder namespaces. The latter is the one I need/use. a003 list "" * * LIST (\Marked \HasNoChildren) "." "INBOX" a003 OK LIST completed -> A wildcard list of everything, without giving any namespace. This results in only one response: My INBOX. a004 list "" #shared.* * LIST (\HasNoChildren) "." "#shared.support@mydomain de" * LIST (\HasNoChildren) "." "#shared.sql-bugs@mydomain de" * LIST (\HasNoChildren) "." "#shared.treffen@mydomain de" * LIST (\HasNoChildren) "." "#shared.presse@anotherdomain de" * LIST (\HasNoChildren) "." "#shared.info@anotherdomain de" a004 OK LIST completed -> The "right way" (tm) to list the shared namespaces. Expected result: ---------------- Since both the RFC document php.net/imap links to and the underlying c-client library itself support these operations, I'd expect to have any kind of support for that methods in php as well. Actual result: -------------- No shared folders from php. No useable mail client in php. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=38712&edit=1