Hi list,
I'm testing a shared mailbox with roundcube and, so far, didn't manage to make it work. I have cyrus-imap and a shared mailbox named "testshared" in /var/spool/cyrus/mail/t/shared/testshared
I can subscribe and browse this mailbox from thunderbird with userA. But with the same userA, when I try to access it from roundcube, I get the error "Server Error: STATUS: Mailbox does not exist".
I tried to change my default settings in main.inc.php as follow:
$rcmail_config['imap_ns_personal'] = "INBOX."; $rcmail_config['imap_ns_other'] = null; $rcmail_config['imap_ns_shared'] = "shared.";
But that doesn't work either. What is the correct configuration to access a shared mailbox from roundcube ?
Thanks, Julien _______________________________________________ List info: http://lists.roundcube.net/users/ BT/9b404e9e
On 14.12.2010 18:28, Julien Vehent wrote:
$rcmail_config['imap_ns_personal'] = "INBOX."; $rcmail_config['imap_ns_other'] = null; $rcmail_config['imap_ns_shared'] = "shared.";
Looks good. Maybe there should be "#shared."? If cyrus does support NAMESPACE these options can be set to null (re-login required). Enable imap_debug in Roundcube and show as the log.
On 12/15/2010 02:31 AM, A.L.E.C wrote:
On 14.12.2010 18:28, Julien Vehent wrote:
$rcmail_config['imap_ns_personal'] = "INBOX."; $rcmail_config['imap_ns_other'] = null; $rcmail_config['imap_ns_shared'] = "shared.";
Looks good. Maybe there should be "#shared."? If cyrus does support NAMESPACE these options can be set to null (re-login required). Enable imap_debug in Roundcube and show as the log.
Hi Alec,
[15-Dec-2010 16:01:44 +0100]: C: A0003 STATUS INBOX.shared.testshared (MESSAGES UNSEEN) [15-Dec-2010 16:01:44 +0100]: S: A0003 NO Mailbox does not exist
I am not sure the $rcmail_config['imap_ns_shared'] is working properly, or maybe it doesn't detect that "shared.testshared" is a shared mailbox. I tried to set it to the following value with no success (it always look for INBOX.shared.testshared):
$rcmail_config['imap_ns_shared'] = "shared.";
$rcmail_config['imap_ns_shared'] = "#shared.";
$rcmail_config['imap_ns_shared'] = null;
On login, the CAPABILITY command returns the following:
[15-Dec-2010 16:12:20 +0100]: C: A0003 CAPABILITY [15-Dec-2010 16:12:20 +0100]: S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE LOGINDISABLED [15-Dec-2010 16:12:20 +0100]: S: A0003 OK Completed [15-Dec-2010 16:12:20 +0100]: C: A0004 LSUB "" "*" [15-Dec-2010 16:12:20 +0100]: S: * LSUB () "." "INBOX.Drafts" [15-Dec-2010 16:12:20 +0100]: S: * LSUB () "." "INBOX.Sent" [15-Dec-2010 16:12:20 +0100]: S: * LSUB () "." "INBOX.Trash" [15-Dec-2010 16:12:20 +0100]: S: * LSUB () "." "INBOX.sent-mail" [15-Dec-2010 16:12:20 +0100]: S: * LSUB () "." "shared.testshared" [15-Dec-2010 16:12:20 +0100]: S: A0004 OK Completed (0.000 secs 6 calls)
It properly lists the shared mailbox. However, it doesn't check the number of unread messages in that mailbox.
Thanks, Julien _______________________________________________ List info: http://lists.roundcube.net/users/ BT/9b404e9e
On 15.12.2010 16:16, Julien Vehent wrote:
$rcmail_config['imap_ns_shared'] = "shared."; $rcmail_config['imap_ns_shared'] = "#shared."; $rcmail_config['imap_ns_shared'] = null; $rcmail_config['imap_ns_shared'] = "";
This option is not used when IMAP server supports NAMESPACE...
[15-Dec-2010 16:12:20 +0100]: C: A0003 CAPABILITY [15-Dec-2010 16:12:20 +0100]: S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE LOGINDISABLED
...and your server does support it. So, do re-login in Roundcube (it's required because namespace settings are stored in session) and check in the log what is returned for NAMESPACE command.
On 12/16/2010 02:20 AM, A.L.E.C wrote:
On 15.12.2010 16:16, Julien Vehent wrote:
$rcmail_config['imap_ns_shared'] = "shared."; $rcmail_config['imap_ns_shared'] = "#shared."; $rcmail_config['imap_ns_shared'] = null; $rcmail_config['imap_ns_shared'] = "";
This option is not used when IMAP server supports NAMESPACE...
[15-Dec-2010 16:12:20 +0100]: C: A0003 CAPABILITY [15-Dec-2010 16:12:20 +0100]: S: * CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS ID NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY SORT THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE IDLE LOGINDISABLED
...and your server does support it. So, do re-login in Roundcube (it's required because namespace settings are stored in session) and check in the log what is returned for NAMESPACE command.
Here it is:
[16-Dec-2010 14:53:57 +0100]: C: A0003 NAMESPACE [16-Dec-2010 14:53:57 +0100]: S: * NAMESPACE (("INBOX." ".")) (("user." ".")) (("" "."))
I'm not familiar with the namespace command, but if it wasn't working properly, it shouldn't see the shared folder in roundcube. right ?
Julien _______________________________________________ List info: http://lists.roundcube.net/users/ BT/9b404e9e
On 16.12.2010 14:58, Julien Vehent wrote:
[16-Dec-2010 14:53:57 +0100]: C: A0003 NAMESPACE [16-Dec-2010 14:53:57 +0100]: S: * NAMESPACE (("INBOX." ".")) (("user." ".")) (("" "."))
I'm not familiar with the namespace command, but if it wasn't working properly, it shouldn't see the shared folder in roundcube. right ?
It should probably return:
So, maybe you should ask on cyrus' mailing-list.
On 12/16/2010 09:03 AM, A.L.E.C wrote:
On 16.12.2010 14:58, Julien Vehent wrote:
[16-Dec-2010 14:53:57 +0100]: C: A0003 NAMESPACE [16-Dec-2010 14:53:57 +0100]: S: * NAMESPACE (("INBOX." ".")) (("user." ".")) (("" "."))
I'm not familiar with the namespace command, but if it wasn't working properly, it shouldn't see the shared folder in roundcube. right ?
It should probably return:
- NAMESPACE (("INBOX." ".")) (("user." ".")) (("shared." "."))
So, maybe you should ask on cyrus' mailing-list.
I'll ask them. I'm currently reading the RFC of the NAMESPACE extension.
However, how do you explain that Thunderbird can access the shared mailbox just fine (read, write, delete, ...) ?
Julien _______________________________________________ List info: http://lists.roundcube.net/users/ BT/9b404e9e
On 16.12.2010 15:18, Julien Vehent wrote:
I'll ask them. I'm currently reading the RFC of the NAMESPACE extension.
However, how do you explain that Thunderbird can access the shared mailbox just fine (read, write, delete, ...) ?
It is a problem in Roundcube, agreed. We have a few possibilities of fixing this on Roundcube side:
E.g. when parsing LIST/LSUB response we should check folder prefix if doesn't exists add it to shared namespace (internal) definition. This will not work if personal namespace doesn't use prefix.
response from server.
will be not removed (could be removed for display only). More work. Probably not backward compatible change.
None will be needed when you fix namespace response.
You can open a ticket in trac pointing to this thread.
On 12/16/2010 09:33 AM, A.L.E.C wrote:
On 16.12.2010 15:18, Julien Vehent wrote:
I'll ask them. I'm currently reading the RFC of the NAMESPACE extension.
However, how do you explain that Thunderbird can access the shared mailbox just fine (read, write, delete, ...) ?
It is a problem in Roundcube, agreed. We have a few possibilities of fixing this on Roundcube side:
- We could detect such situation and handle folder names correctly.
E.g. when parsing LIST/LSUB response we should check folder prefix if doesn't exists add it to shared namespace (internal) definition. This will not work if personal namespace doesn't use prefix.
- We could make imap_ns_* options (if defined) to overwrite namespace
response from server.
- We could change folder names handling, so personal namespace prefix
will be not removed (could be removed for display only). More work. Probably not backward compatible change.
None will be needed when you fix namespace response.
You can open a ticket in trac pointing to this thread.
I started the discussion on the cyrus mailing list: http://lists.andrew.cmu.edu/pipermail/info-cyrus/2010-December/034249.html
I suppose your second option (overwrite namespace response) would be preferable. Sysadmin are used to configuration options that force a specific behavior, it's less confusing.
I don't know yet if it's roundcube, cyrus or me that is responsible for this problem. I will investigate and file a ticket if necessary. However, if you had a quick patch to overwrite namespace response (or indicate me where to do the change), I'd appreciate.
Thanks, Julien
List info: http://lists.roundcube.net/users/ BT/9b404e9e
Got it ! It was the altnamespace option in /etc/imapd.conf that was set to no (debian's default).
# Alternate namespace # If enabled, activate the alternate namespace as documented in # /usr/share/doc/cyrus-doc-2.2/html/altnamespace.html, where an user's # subfolders are in the same level as the INBOX # See also userprefix and sharedprefix on imapd.conf(5) altnamespace: yes
It works fine now. All imap_ns_* parameters are set to null in main.inc.php.
Thanks for your help.
Julien _______________________________________________ List info: http://lists.roundcube.net/users/ BT/9b404e9e
Back to the original discussion. It appears that cyrus's altnamespace option shouldn't be used for this (it's considered an ugly fix).
It also seems that this bug is purely roundcube related...
Does anybody else use cyrus imap, roundcube and shared mailboxes ?
Below is the quote of my last email on the cyrus mailing list:
============================================================= On 12/16/2010 01:54 PM, Dan White wrote:
See RFC 2342 for the specification on what the NAMESPACE response
means.
In this case, it appears you created a mailbox named
'shared.testshared',
which falls under the shared name space in Cyrus, and in which case the 'shared.' part of the mailbox name is redundant, and may be
confusing the
issue. A mailbox named 'testshared' would also fall under the shared namespace.
That mailbox would correctly be returned as 'shared.testshared' with altnamespace turned off, and 'Shared Folders.shared.testshared' with it turned on and 'sharedprefix' configured with 'Shared Folders',
which is the
default.
Both cases are correct and a compliant IMAP client should handle
both. In
neither case should the mailbox be searched for under the personal name space, which roundcube appears to be doing.
I just tried to create a mailbox without the 'shared.' prefix, as follow:
# cyradm --user cyrus localhost Password: localhost> cm shrdmailbx localhost> sam shrdmailbx anyone p localhost> sam shrdmailbx julien lr localhost> sam shrdmailbx michel lrswipcd localhost> quit
I set altnamespace:no and restarted cyrus. The result is the same as before. I can subscribe and access the mailbox from thunderbird, but I can't from roundcube.
When i set altnamespace: yes and restart cyrus, I can access the mailbox 'resgate' from roundcube.
I will forward that information to the roundcube's mailing list and work with them to solve the issue.
Thanks for your help
List info: http://lists.roundcube.net/users/ BT/9b404e9e
On 16.12.2010 21:24, Julien Vehent wrote:
Both cases are correct and a compliant IMAP client should handle
both. In
neither case should the mailbox be searched for under the personal name space, which roundcube appears to be doing.
The problem here is that your personal namespace has got "INBOX." prefix. So, if shared.testshared has to be handled as personal it should be named INBOX.shared.testshared.
So, problem is in how Roundcube handles folders that doesn't belong to any of defined namespaces. Point 3. from my previous message.
On 17.12.2010 08:27, A.L.E.C wrote:
The problem here is that your personal namespace has got "INBOX." prefix. So, if shared.testshared has to be handled as personal it should be named INBOX.shared.testshared.
So, problem is in how Roundcube handles folders that doesn't belong to any of defined namespaces. Point 3. from my previous message.
Added ticket for this http://trac.roundcube.net/ticket/1487637
Also since r4344 imap_ns_* options can be used to overwrite server's namespaces.
On 12/17/2010 04:26 AM, A.L.E.C wrote:
On 17.12.2010 08:27, A.L.E.C wrote:
The problem here is that your personal namespace has got "INBOX." prefix. So, if shared.testshared has to be handled as personal it should be named INBOX.shared.testshared.
So, problem is in how Roundcube handles folders that doesn't belong to any of defined namespaces. Point 3. from my previous message.
Added ticket for this http://trac.roundcube.net/ticket/1487637
Also since r4344 imap_ns_* options can be used to overwrite server's namespaces.
Thanks Alec,
I commented on the ticket to add some information. Hope it helps.
I will give a shot to r4344. What should I put in imap_ns_* options ?
Julien _______________________________________________ List info: http://lists.roundcube.net/users/ BT/9b404e9e
On Fri, 17 Dec 2010 11:40:28 -0500, Julien Vehent wrote:
I will give a shot to r4344. What should I put in imap_ns_* options ?
I think imap_ns_shared="shared." should be enough.