6.0.0-beta1
7/7/25

[#1550] not displaying courier-imap virtual shared folders
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

History
08/16/2005 05:21:57 AM Michael Slusarz Comment #7 Reply to this comment
See Bug 2422.
08/12/2005 02:55:32 PM Jan Schneider Comment #6
State ⇒ Resolved
Reply to this comment
Michael's working on such a solution at the moment.
07/23/2005 01:00:45 AM Michael Slusarz Comment #5
State ⇒ Feedback
Reply to this comment
This issue will be *really* hard and hackish (and slow) to fix without 
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...
05/05/2005 12:48:33 PM Jan Schneider State ⇒ Assigned
 
03/17/2005 09:41:37 PM m (dot) zdila (at) episoftware (dot) com Comment #4 Reply to this comment
First, #shared is not a mailbox, it is a namespace. For example, if 
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
returned IMAP data
*** 1. folders are not subscribed ***



! imap_getsubscribed, #shared
LSUB "" #shared
< OK LSUB completed



! imap_getmailboxes, #shared
LIST "" #shared
< OK LIST completed



! imap_getsubscribed, #shared.%
LSUB "" #shared.%
< OK LSUB completed



! imap_getmailboxes, #shared.%
LIST "" #shared.%
< LIST (\Noselect \HasChildren) "." "#shared.test@episoftware com"

< OK LIST completed





*** 2. folders are subscribed ***



! imap_getsubscribed, #shared
LSUB "" #shared
< LSUB (\Noselect \HasChildren) "." "#shared"

< OK LSUB completed



! imap_getmailboxes, #shared
LIST "" #shared
< OK LIST completed



! imap_getsubscribed, #shared.%
LSUB "" #shared.%
< LSUB (\Noselect \HasChildren) "." "#shared.test@episoftware com"

< OK LSUB completed



! imap_getmailboxes, #shared.%
LIST "" #shared.%
< LIST (\Noselect \HasChildren) "." "#shared.test@episoftware com"

< 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 :-)
03/17/2005 08:03:52 PM Michael Slusarz Comment #3
State ⇒ Feedback
Reply to this comment
I've implemented the first part of this report in HEAD and will merge 
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).
03/15/2005 03:39:42 PM Chuck Hagenbuch Summary ⇒ not displaying courier-imap virtual shared folders
 
03/15/2005 03:37:38 PM m (dot) zdila (at) episoftware (dot) com Comment #2 Reply to this comment
another problem ...



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.
03/15/2005 03:29:16 PM Chuck Hagenbuch Assigned to Michael Slusarz
State ⇒ Assigned
 
03/15/2005 02:05:18 PM m (dot) zdila (at) episoftware (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ nod displaying courier-imap virtual shared folders
Queue ⇒ IMP
State ⇒ Unconfirmed
Reply to this comment
Hi



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);


Saved Queries