roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.94k stars 1.65k forks source link

Handling of folders that doesn't belong to any namespace #3184

Closed rcubetrac closed 13 years ago

rcubetrac commented 13 years ago

Reported by @alecpl on 17 Dec 2010 09:24 UTC as Trac ticket #1487637

The issue has been discussed here: http://lists.roundcube.net/mail-archive/users/2010-12/0000028.html. In some situations LIST returns folders that doesn't belongs to defined namespaces. If personal namespace is defined with prefix (e.g. "INBOX.") then such folders are not handled properly (personal namespace prefix is added). One solution would be to just skip such folders, but better would be to operate on not modified folder names and modify them only for display purposes. So, rcube_imap::mod_mailbox() shouldn't be used inside of rcube_imap class.

Migrated-From: http://trac.roundcube.net/ticket/1487637

rcubetrac commented 13 years ago

Comment by jvehent on 17 Dec 2010 16:38 UTC

With cyrus-imapd 2.2, the browsing of shared mailbox works if option altnamespace is set to yes in imapd.conf.

If altnamespace: no, roundcube doesn't access shared mailboxes properly.

== Examples ==

1. altnamespace: no => doesn't work

* OK webmail Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready
. login julien XXXXXXXXXX
. OK User logged in

. namespace
* NAMESPACE (("INBOX." ".")) (("user." ".")) (("" "."))
. OK Completed

. list "" "*"
* LIST (\HasChildren) "." "INBOX"
* LIST (\HasNoChildren) "." "INBOX.Sent"
* LIST (\HasChildren) "." "INBOX.Trash"
* LIST (\HasNoChildren) "." "INBOX.drafts"
* LIST (\HasNoChildren) "." "INBOX.root"
* LIST (\HasNoChildren) "." "INBOX.sent-mail"
* LIST (\HasNoChildren) "." "shared.testshared" 

Roundcube tries to access "shared.testshared" in "INBOX.shared.testshared".

2. altnamespace: yes => work


* OK webmail Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready
. login julien XXXXXXX
. OK User logged in

. namespace
* NAMESPACE (("" ".")) (("Other Users." ".")) (("Shared Folders." "."))
. OK Completed

. list "" "*"
* LIST (\Noinferiors) "." "INBOX"
* LIST (\HasNoChildren) "." "Sent"
* LIST (\HasChildren) "." "Trash"
* LIST (\HasNoChildren) "." "drafts"
* LIST (\HasNoChildren) "." "root"
* LIST (\HasNoChildren) "." "sent-mail"
* LIST (\HasNoChildren) "." "Shared Folders.shared.testshared"
. OK Completed (0.000 secs 9 calls)
rcubetrac commented 13 years ago

Comment by @alecpl on 20 Dec 2010 12:41 UTC

Related issue: http://www.roundcubeforum.net/3-news-announcements/12-general-discussion/7705-embeded-folder-error.html#post31892

rcubetrac commented 13 years ago

Comment by @alecpl on 22 Apr 2011 12:32 UTC

Attached patch fixes the issue. Please, test it extensively.

rcubetrac commented 13 years ago

Comment by @alecpl on 5 May 2011 12:47 UTC

Fixed in d08333ea.

rcubetrac commented 13 years ago

Status changed by @alecpl on 5 May 2011 12:47 UTC

new => closed