cyrusimap / cyrus-imapd

Cyrus IMAP is an email, contacts and calendar server
http://cyrusimap.org
Other
536 stars 146 forks source link

Top-level shared mailboxes appear twice in LIST response with alt_namespace #756

Open brong opened 18 years ago

brong commented 18 years ago

From: s.e.grier@qmul.ac.uk Bugzilla-Id: 2789 Version: 2.2.x Owner: Ken Murchison

brong commented 18 years ago

From:

We're using cyrus-imapd-2.2.12 with alternative namespace enabled on a Solaris 7 system. Our imapd.conf has:

altnamespace: yes userprefix: user sharedprefix: shared

Creating a top-level shared mailbox beginning with "user", like "useradmin" or "usertest", causes the mailbox to appear twice in response to a LIST "" "*" command:

. list "" "*" <snip>

This seems to be caused by mboxlist_findall_alt() retrieving the mailbox twice, once when it searches the mailbox database for mailboxes in the "user." namespace using the key "user", and then again when searching for remaining mailboxes in the shared namespace. The find_p() function appears to accept the mailbox on both occasions because it is not in the "user." namespace.

It's not clear what the correct fix for this would be, so I'm not submitting a patch. One could search for mailboxes in the "user." namespace with the key "user." but I'm not familiar enough with the code to know whether this will break Cyrus in other ways. Obviously, avoiding top-level mailboxes which conflict with internal namespaces is an acceptable workaround.

As a related issue, when creating a top-level shared mailbox beginning with "shared...", like "sharedmbox", the mailbox does not appear in the "shared." namespace:

. list "" "*" <snip>

It's not clear whether this is the same bug as above.

brong commented 18 years ago

From:

Bug 2790 has been marked as a duplicate of this bug.

brong commented 9 years ago

From: Bron Gondwana

Batch moving bugs that won't be in 2.5