Dear list,
I have a small mailserver with around 200 accounts and I'm using roundcube (0.7) as the primary webmail interface after migrating from squirrelmail 1 year ago. I'm now trying to get shared folders to work with my courier-imap mail server (4.8.0-3 on debian squeeze).
After the configuration of a simple virtual shared folder in a testaccount (via the shared folder plugin), I'm able to access and subscribe to this folder from the permitted user account. But in roundcube I don't see this folder because they are outside of the namespace INBOX even if i define the namespaces manually like this:
$rcmail_config['imap_ns_personal'] = "INBOX."; $rcmail_config['imap_ns_other'] = null; $rcmail_config['imap_ns_shared'] = "#shared.";
I activated imap debugging and found the following
C: A0002 LIST "" "*" [...] a list of all Mailboxes under INBOX. S: A0002 OK LIST completed C: A0003 LIST #shared. "*" S: A0003 OK LIST completed
the second command (LIST #shared "*") is the problem. I don't know if this is RFC conform, but it doesn't work for courier-imap. In my opinion the first argument should be the delimiter, the second argument the mailboxname or wildcard. My mailserver expects something like the following command: C: A0003 LIST "." "#shared.*"
I did a quickfix in _list_unsubscribe() and now the shared folders are listed in the settings folder view even when the imap_ns_* flags are not set. But I'm still not able to see them in the mailbox view and the subscribe toggle is always reseted. I think there would be other changes to get that working like this. But I'm pretty sure that my changes are not necessary and it's because of a misconfiguration on my side. But after debugging the code and reading specific reports (#1487657, #1403507) about similar issues I'm still not able to get it working.
I would really appreciate any help, suggestions or directions to any tutorials thanks in advance simeon
On 05/09/2012 11:51 AM, Simeon Ott wrote:
$rcmail_config['imap_ns_personal'] = "INBOX."; $rcmail_config['imap_ns_other'] = null; $rcmail_config['imap_ns_shared'] = "#shared.";
If server supports namespace then you just should set these options to null. Remember to do a re-login in Roundcube after change.
Enable imap_debug in Roundcube and send the log here (after you change these settings and log out).
On 09.05.2012, at 11:59, A.L.E.C wrote:
On 05/09/2012 11:51 AM, Simeon Ott wrote:
$rcmail_config['imap_ns_personal'] = "INBOX."; $rcmail_config['imap_ns_other'] = null; $rcmail_config['imap_ns_shared'] = "#shared.";
If server supports namespace then you just should set these options to null. Remember to do a re-login in Roundcube after change.
Enable imap_debug in Roundcube and send the log here (after you change these settings and log out).
The server supports the NAMESPACE command but as stated the result is almost the same (beside the additional folder for other real shared folders). Here is the requested output after changing these settings re-login and visiting the settings->folder page:
[09-May-2012 12:03:13 +0200]: [C589] S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2010 Double Precision, Inc. See COPYING for distribution information. [09-May-2012 12:03:13 +0200]: [C589] C: A0001 LOGIN user@domain password [09-May-2012 12:03:13 +0200]: [C589] S: A0001 OK LOGIN Ok. [09-May-2012 12:03:13 +0200]: [C589] C: A0002 LIST "" "*" [09-May-2012 12:03:13 +0200]: [C589] S: * LIST (\HasNoChildren) "." "INBOX.Trash" [09-May-2012 12:03:13 +0200]: [C589] S: * LIST (\Unmarked \HasChildren) "." "INBOX" [09-May-2012 12:03:13 +0200]: [C589] S: * LIST (\HasNoChildren) "." "INBOX.Sent" [09-May-2012 12:03:13 +0200]: [C589] S: * LIST (\HasNoChildren) "." "INBOX.Drafts" [09-May-2012 12:03:13 +0200]: [C589] S: * LIST (\HasNoChildren) "." "INBOX.Spam" [09-May-2012 12:03:13 +0200]: [C589] S: A0002 OK LIST completed [09-May-2012 12:03:13 +0200]: [C589] C: A0003 LIST #shared. "*" [09-May-2012 12:03:13 +0200]: [C589] S: A0003 OK LIST completed [09-May-2012 12:03:13 +0200]: [C589] C: A0004 LIST shared. "*" [09-May-2012 12:03:13 +0200]: [C589] S: A0004 OK LIST completed [09-May-2012 12:03:13 +0200]: [C589] C: A0005 CAPABILITY [09-May-2012 12:03:13 +0200]: [C589] S: * CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION [09-May-2012 12:03:13 +0200]: [C589] S: A0005 OK CAPABILITY completed [09-May-2012 12:03:13 +0200]: [C589] C: A0006 LSUB "" "*" [09-May-2012 12:03:13 +0200]: [C589] S: * LSUB (\Unmarked \HasChildren) "." "INBOX" [09-May-2012 12:03:13 +0200]: [C589] S: * LSUB (\HasNoChildren) "." "INBOX.Spam" [09-May-2012 12:03:13 +0200]: [C589] S: * LSUB (\HasNoChildren) "." "INBOX.Drafts" [09-May-2012 12:03:13 +0200]: [C589] S: * LSUB (\HasNoChildren) "." "INBOX.Trash" [09-May-2012 12:03:13 +0200]: [C589] S: * LSUB (\HasNoChildren) "." "INBOX.Sent" [09-May-2012 12:03:13 +0200]: [C589] S: A0006 OK LSUB completed [09-May-2012 12:03:13 +0200]: [C589] C: A0007 GETQUOTAROOT INBOX [09-May-2012 12:03:13 +0200]: [C589] S: * QUOTAROOT "INBOX" "ROOT" [09-May-2012 12:03:13 +0200]: [C589] S: * QUOTA "ROOT" (STORAGE 1267463 1464844) [09-May-2012 12:03:13 +0200]: [C589] S: A0007 OK GETQUOTAROOT Ok. [09-May-2012 12:03:13 +0200]: [C589] C: A0008 LOGOUT [09-May-2012 12:03:13 +0200]: [C589] S: * BYE Courier-IMAP server shutting down [09-May-2012 12:03:13 +0200]: [C589] S: A0008 OK LOGOUT completed
If server supports namespace then you just should set these options to null. Remember to do a re-login in Roundcube after change.
Enable imap_debug in Roundcube and send the log here (after you change these settings and log out).
these part of the log is maybe important as well...
[09-May-2012 12:12:08 +0200]: [69BC] C: A0002 NAMESPACE [09-May-2012 12:12:08 +0200]: [69BC] S: * NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." "."))
On 05/09/2012 12:11 PM, Simeon Ott wrote:
[09-May-2012 12:03:13 +0200]: [C589] C: A0003 LIST #shared. "*" [09-May-2012 12:03:13 +0200]: [C589] S: A0003 OK LIST completed
A Courier bug. I've found some resources confirming this behaviour. It looks we need a workaround for this. Please, open a ticket in our bugtracker.
http://www.courier-mta.org/imap/tutorial.setup.html http://www.sogo.nu/bugs/print_bug_page.php?bug_id=344
On 09.05.2012, at 13:29, A.L.E.C wrote:
On 05/09/2012 12:11 PM, Simeon Ott wrote:
[09-May-2012 12:03:13 +0200]: [C589] C: A0003 LIST #shared. "*" [09-May-2012 12:03:13 +0200]: [C589] S: A0003 OK LIST completed
A Courier bug. I've found some resources confirming this behaviour. It looks we need a workaround for this. Please, open a ticket in our bugtracker.
http://www.courier-mta.org/imap/tutorial.setup.html http://www.sogo.nu/bugs/print_bug_page.php?bug_id=344
Thank you Aleksander for the clarification. I opened the following feature ticket: http://trac.roundcube.net/ticket/1488466
Cheers, Simeon
On 05/09/2012 02:19 PM, Simeon Ott wrote:
Thank you Aleksander for the clarification. I opened the following feature ticket: http://trac.roundcube.net/ticket/1488466
Could you confirm that it also doesn't return shared subscribed folders in LSUB "" "*"?
On 09.05.2012, at 14:52, A.L.E.C wrote:
On 05/09/2012 02:19 PM, Simeon Ott wrote:
Thank you Aleksander for the clarification. I opened the following feature ticket: http://trac.roundcube.net/ticket/1488466
Could you confirm that it also doesn't return shared subscribed folders in LSUB "" "*"?
i just tested this scenario. LSUB "" "*" does only list subscribed folders in the personal namespace INBOX. To list subscribed shared folders you have to use LSUB "" "#shared.*"
On 05/09/2012 03:27 PM, Simeon Ott wrote:
I opened the following feature ticket: http://trac.roundcube.net/ticket/1488466
Here's a proposed solution, but it should be tested on various servers with shared namespaces.
https://github.com/roundcube/roundcubemail/commit/0af82c8a59855d3010d935f325...
Also I think I'd add a config option, to not loose performance on servers which doesn't need this hack.
On 15.05.2012, at 12:33, A.L.E.C wrote:
On 05/09/2012 03:27 PM, Simeon Ott wrote:
I opened the following feature ticket: http://trac.roundcube.net/ticket/1488466
Here's a proposed solution, but it should be tested on various servers with shared namespaces.
https://github.com/roundcube/roundcubemail/commit/0af82c8a59855d3010d935f325...
Also I think I'd add a config option, to not loose performance on servers which doesn't need this hack.
Thanks for your work, I'm going to test your solution on my servers in the next few days and report back. Are you planning to integrate such a patch (with an appropriate config option) into the next release?
On 05/15/2012 12:42 PM, Simeon Ott wrote:
Thanks for your work, I'm going to test your solution on my servers in the next few days and report back. Are you planning to integrate such a patch (with an appropriate config option) into the next release?
The patch is for git (master and release-0.8) version. If I'd have confirmation from more users that it works, there's a chance that it will be included into 0.8-stable release.