Summary | not displaying courier-imap virtual shared folders |
Queue | IMP |
Queue Version | 4.0.2 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | m.zdila (at) episoftware (dot) com |
Created | 03/15/2005 (7419 days ago) |
Due | |
Updated | 08/16/2005 (7265 days ago) |
Assigned | 07/23/2005 (7289 days ago) |
Resolved | 08/12/2005 (7269 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Bug 2422.State ⇒ Resolved
State ⇒ Feedback
the use of the return from a NAMESPACE call to the IMAP server. And,
unfortunately, there is no way to get this information from the server
via c-client. This may finally drive me to work on a simple php imap
client that has the sole job of logging into the IMAP server to
retrieve the namespace information...
user joe@domain.com will share his folder my-shared, then another user
can find it (subscribe) under #shared.joe@domain.com.my-shared.
Directly under the #shared can be no emails.
Legend:
! php_command, 3. parameter
< sent IMAP data
! imap_getsubscribed, #shared
! imap_getmailboxes, #shared
! imap_getsubscribed, #shared.%
! imap_getmailboxes, #shared.%
< OK LIST completed
*** 2. folders are subscribed ***
! imap_getsubscribed, #shared
< OK LSUB completed
! imap_getmailboxes, #shared
! imap_getsubscribed, #shared.%
< OK LSUB completed
! imap_getmailboxes, #shared.%
< OK LIST completed
If you wish, I can send you login and password so you can test it. I
don't know if that behavior is broken or not. They say it is according
to RFC and mozilla-thunderbird works as expected.
Some interesting reading:
http://www.gwolf.org/index.php?gadget=blog&action=single_view&id=21
http://sourceforge.net/mailarchive/forum.php?thread_id=5677043&forum_id=33081
I hope I've helped you :-)
State ⇒ Feedback
back to 4.0.3 soon.
As for the second part - I tend to think that either c-client or
Courier is broken if it is returning false to an
imap_getmailboxes(..., ..., '#shared') query. imap_getmailboxes() is
supposed to return information on a mailbox if it exists, so if it is
returning false than that means the mailbox doesn't exist. Are
courier-imap shared hierarchies a valid folder? (i.e. could messages
live in '#shared' directly instead of '#shared/foo')? It would seem
so since imap_getmailboxes() will return information on '#shared' in
some instances (i.e. there is at least one subscribed folder
underneath it).
If none of shared folders under #shared are subscribed, ti is not
possible to subscribe them using imp. I tryed to fix it in the code
but it seems it is too much for me for now. I could try it yet later.
What I found using courier-imap:
If the folders are not subscribed, function imap_getsubscribed(.., ..,
"#shared") returns false, function imap_getmailboxes(.., ..,
"#shared") returns false. If the folders are subscribed, function
imap_getsubscribed(.., .., "#shared") returns array with the folder,
function imap_getmailboxes(.., .., "#shared") returns false.
If I use "#shared.%" instead of "#shared.%", retults are (same order
of calling):
false, array with subfolders, array with subfolders, array with subfolders.
If smeone will ask, I can provide 2 login/pass on my courier-imap
server for testing. Subscribtion can be done for testing by mozilla
thunderbird.
State ⇒ Assigned
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ nod displaying courier-imap virtual shared folders
Queue ⇒ IMP
State ⇒ Unconfirmed
I use courier-imap server with virtual shared folders whose namespace
is #shared. I added into imap server configuration:
'hierarchies' => array("#shared")
In the tree hierarchy I saw only:
#shared
L test@domain com
instead of:
#shared
[+] test@domain com
L some-shared-folder
Under Folders menu I saw all the shared folders only if I [Showed
Unsubscribed]. Subscribing all the shared folders didn't show them in
the left tree menu. I found the problem in Horde/imp/lib/IMAP/Tree.php
or Horde/lib/Horde/IMAP/Tree.php - the namespaces in hierarches wasn't
checked for subsctiption (array $this->_subscribed). I send you a
patch that removes that problem. Maybe you'll find better place to add
this code.
--- ../../../../Horde/imp/lib/IMAP/Tree.php Mon Jan 3 13:25:34 2005
+++ Tree.php Tue Mar 15 14:48:58 2005
@@ -153,6 +153,14 @@
* add them in. */
foreach ($GLOBALS['imp']['hierarchies'] as $val) {
$val = $this->noTrailingDelimiter($val);
+
+ $sublist = @imap_lsub($this->_getStream(),
$this->_server, $val . '*');
+ if (!empty($sublist)) {
+ foreach ($sublist as $val2) {
+ $this->_subscribed[substr($val2, strpos($val2,
'}') + 1)] = 1;
+ }
+ }
+
$tmp = $this->_getMailbox($val);
if ($tmp) {
$tmp->name = $this->noTrailingDelimiter($tmp->name);