[Dovecot] Problem in sharing mailboxes across users
Hello everyone, I'm trying to configure dovecot to allow users to share their imap folders. I've followed the wiki and i'm near to accomplish my tasks, when i set ACL properly on folders using imap commands the other user can see the folder as shared, but i can't subscribe to it or even access its content using any email client (like thunderbird) couse it looks like the path to the shared folder is not complete.
i mean when i go to "manage subscriptions" i can see the shared folder from the other users as "shared/user@domain/sharedfoldername" but since only "sharedfoldername" is present i cant subscribe to it.
am i missing somethimg? like do i need to setup a particular directory tree on the filesystem?
thnx in advice for your help.
Best regards. Francesco.
On Tue, 2010-02-09 at 16:44 +0100, Rampage wrote:
i mean when i go to "manage subscriptions" i can see the shared folder from the other users as "shared/user@domain/sharedfoldername" but since only "sharedfoldername" is present i cant subscribe to it.
I don't really understand.
Show your dovecot -n output
Talk IMAP protocol directly. What does LIST command show? http://wiki.dovecot.org/TestInstallation
Timo Sirainen ha scritto:
On Tue, 2010-02-09 at 16:44 +0100, Rampage wrote:
i mean when i go to "manage subscriptions" i can see the shared folder from the other users as "shared/user@domain/sharedfoldername" but since only "sharedfoldername" is present i cant subscribe to it.
I don't really understand.
Show your dovecot -n output
Talk IMAP protocol directly. What does LIST command show? http://wiki.dovecot.org/TestInstallation
Hi, thnx for your reply. here is my dovecot -n output
# 1.2.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.18-6-686 i686 Debian 4.0 ext3 log_path: /var/log/dovecot.log log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap pop3 imaps pop3s ssl: no ssl_cert_file: /etc/ssl/easymail.crt ssl_key_file: /etc/ssl/easymail.key disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/lib/dovecot/imap-login login_executable(imap): /usr/lib/dovecot/imap-login login_executable(pop3): /usr/lib/dovecot/pop3-login login_greeting: EasyM@IL ready. mail_location: maildir:/var/utenti/%d/%n/Maildir mmap_disable: yes lock_method: dotlock mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugins(default): acl imap_acl mail_plugins(imap): acl imap_acl mail_plugins(pop3): mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): oe-ns-eoh namespace: type: private separator: / prefix: INBOX/ inbox: yes list: yes subscriptions: yes namespace: type: shared separator: / prefix: shared/%%u/ location: maildir:/var/utenti/%d/%%n/Maildir:INDEX=/var/utenti/%d/%n/Maildir/shared/%%u list: children lda: auth_socket_path: /var/run/dovecot/auth-master mail_plugins: cmusieve acl auth default: mechanisms: login plain verbose: yes passdb: driver: sql args: /etc/dovecot/dovecot-sql.conf passdb: driver: pam userdb: driver: sql args: /etc/dovecot/dovecot-sql.conf userdb: driver: static args: uid=65000 gid=65000 mail=maildir:/var/utenti/ADS/%Lu/Maildir socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix plugin: acl: vfile acl_shared_dict: file:/var/utenti/%d/shared-mailboxes.db
and here is what happens when i list the imap folders via telnet
b list "" *
- LIST (\HasChildren) "/" "INBOX"
- LIST (\HasNoChildren) "/" "INBOX/Trash"
- LIST (\Noselect \HasChildren) "/" "shared/cattivo@ciccio.it"
- LIST (\HasNoChildren) "/" "shared/cattivo@ciccio.it/bumbum" b OK List completed. c logout
- BYE Logging out c OK Logout completed. Connection closed by foreign host.
as you can see the shared folder is listed but something seems to be wrong in the path.
thnx in advice for your help.
Best regards Francesco.
On Wed, 2010-02-10 at 11:11 +0100, Rampage wrote:
Timo Sirainen ha scritto:
On Tue, 2010-02-09 at 16:44 +0100, Rampage wrote:
i mean when i go to "manage subscriptions" i can see the shared folder from the other users as "shared/user@domain/sharedfoldername" but since only "sharedfoldername" is present i cant subscribe to it.
What do you mean by "only shharedfoldername is present"? What else should there be?
- LIST (\Noselect \HasChildren) "/" "shared/cattivo@ciccio.it"
- LIST (\HasNoChildren) "/" "shared/cattivo@ciccio.it/bumbum"
This looks correct. You could continue by testing that the mailbox actually works:
a SELECT shared/cattivo@ciccio.it/bumbum b SUBSCRIBE shared/cattivo@ciccio.it/bumbum c LSUB "" *
as you can see the shared folder is listed but something seems to be wrong in the path.
I don't see anything wrong.
Timo Sirainen wrote:
On Wed, 2010-02-10 at 11:11 +0100, Rampage wrote:
Timo Sirainen ha scritto:
On Tue, 2010-02-09 at 16:44 +0100, Rampage wrote:
i mean when i go to "manage subscriptions" i can see the shared folder from the other users as "shared/user@domain/sharedfoldername" but since only "sharedfoldername" is present i cant subscribe to it.
What do you mean by "only shharedfoldername is present"? What else should there be?
- LIST (\Noselect \HasChildren) "/" "shared/cattivo@ciccio.it"
- LIST (\HasNoChildren) "/" "shared/cattivo@ciccio.it/bumbum"
This looks correct. You could continue by testing that the mailbox actually works:
a SELECT shared/cattivo@ciccio.it/bumbum b SUBSCRIBE shared/cattivo@ciccio.it/bumbum c LSUB "" *
as you can see the shared folder is listed but something seems to be wrong in the path.
I don't see anything wrong.
mhhh maybe it's an issue in thunderbird 2 that can't manage this? couse actually in TB i cant see the shared folder.. or well, i can see it in the subscription management, but i can't subscribe to it and i cant access the content. everything works fine when talking with the imap server directly.
On Wed, 2010-02-10 at 20:47 +0100, Rampage wrote:
as you can see the shared folder is listed but something seems to be wrong in the path.
I don't see anything wrong.
mhhh maybe it's an issue in thunderbird 2 that can't manage this? couse actually in TB i cant see the shared folder.. or well, i can see it in the subscription management, but i can't subscribe to it and i cant access the content. everything works fine when talking with the imap server directly.
Well, subscriptions aren't necessary in any way. You could just disable subscriptions from TB completely and you should be able to access the mailbox.
But, anyway, if you can't subscribe to it, that's the problem. And looking at your dovecot -n output again, I do see a problem:
namespace: type: private separator: / prefix: INBOX/ inbox: yes list: yes subscriptions: yes
Your primary namespace has INBOX/ prefix..
namespace: type: shared separator: / prefix: shared/%%u/ location: maildir:/var/utenti/%d/%%n/Maildir:INDEX=/var/utenti/%d/% n/Maildir/shared/%%u list: children
And here you don't have subscriptions=no, so it tries to create the subscriptions to the remote user's Maildir. Either it fails, or it modifies the other user's subscriptions. Neither is very good..
So you really should have subscriptions=no for the shared namespace. But then you'll also need to create a namespace with empty prefix where the subscriptions actually are saved to. I don't much like the INBOX/ prefix in any case, so I'd just use:
namespace private { prefix = separator = / subscriptions = yes } namespace private { prefix = INBOX/ separator = / subscriptions = yes hidden = yes list = no }
So that the INBOX/ prefix still works for those people who already have configured it to their clients, but others would be using the empty prefix. That'll also fix the shared subscriptions.
Timo Sirainen wrote:
On Wed, 2010-02-10 at 20:47 +0100, Rampage wrote:
as you can see the shared folder is listed but something seems to be wrong in the path.
I don't see anything wrong.
mhhh maybe it's an issue in thunderbird 2 that can't manage this? couse actually in TB i cant see the shared folder.. or well, i can see it in the subscription management, but i can't subscribe to it and i cant access the content. everything works fine when talking with the imap server directly.
Well, subscriptions aren't necessary in any way. You could just disable subscriptions from TB completely and you should be able to access the mailbox.
But, anyway, if you can't subscribe to it, that's the problem. And looking at your dovecot -n output again, I do see a problem:
namespace: type: private separator: / prefix: INBOX/ inbox: yes list: yes subscriptions: yes
Your primary namespace has INBOX/ prefix..
namespace: type: shared separator: / prefix: shared/%%u/ location: maildir:/var/utenti/%d/%%n/Maildir:INDEX=/var/utenti/%d/% n/Maildir/shared/%%u list: children
And here you don't have subscriptions=no, so it tries to create the subscriptions to the remote user's Maildir. Either it fails, or it modifies the other user's subscriptions. Neither is very good..
So you really should have subscriptions=no for the shared namespace. But then you'll also need to create a namespace with empty prefix where the subscriptions actually are saved to. I don't much like the INBOX/ prefix in any case, so I'd just use:
namespace private { prefix = separator = / subscriptions = yes } namespace private { prefix = INBOX/ separator = / subscriptions = yes hidden = yes list = no }
So that the INBOX/ prefix still works for those people who already have configured it to their clients, but others would be using the empty prefix. That'll also fix the shared subscriptions.
Thank you very much, i'll try your solution, fix it up and let you know.. but not today, since i'm on a free day and i'll work on it tomorrow :)
Timo Sirainen ha scritto:
On Wed, 2010-02-10 at 20:47 +0100, Rampage wrote:
as you can see the shared folder is listed but something seems to be wrong in the path.
I don't see anything wrong.
mhhh maybe it's an issue in thunderbird 2 that can't manage this? couse actually in TB i cant see the shared folder.. or well, i can see it in the subscription management, but i can't subscribe to it and i cant access the content. everything works fine when talking with the imap server directly.
Well, subscriptions aren't necessary in any way. You could just disable subscriptions from TB completely and you should be able to access the mailbox.
But, anyway, if you can't subscribe to it, that's the problem. And looking at your dovecot -n output again, I do see a problem:
namespace: type: private separator: / prefix: INBOX/ inbox: yes list: yes subscriptions: yes
Your primary namespace has INBOX/ prefix..
namespace: type: shared separator: / prefix: shared/%%u/ location: maildir:/var/utenti/%d/%%n/Maildir:INDEX=/var/utenti/%d/% n/Maildir/shared/%%u list: children
And here you don't have subscriptions=no, so it tries to create the subscriptions to the remote user's Maildir. Either it fails, or it modifies the other user's subscriptions. Neither is very good..
So you really should have subscriptions=no for the shared namespace. But then you'll also need to create a namespace with empty prefix where the subscriptions actually are saved to. I don't much like the INBOX/ prefix in any case, so I'd just use:
namespace private { prefix = separator = / subscriptions = yes } namespace private { prefix = INBOX/ separator = / subscriptions = yes hidden = yes list = no }
So that the INBOX/ prefix still works for those people who already have configured it to their clients, but others would be using the empty prefix. That'll also fix the shared subscriptions.
Hi again :) Definitely the problem seems to be namespace related. i applied the modifications to the dovecot.conf file as you suggested but now i'm experiencing duplicated folders.
b list "" *
- LIST (\HasNoChildren) "/" "Trash"
- LIST (\HasChildren) "/" "INBOX"
- LIST (\HasNoChildren) "/" "INBOX/Trash"
- LIST (\Noselect \HasChildren) "/" "shared/cattivo@ciccio.it"
- LIST (\HasNoChildren) "/" "shared/cattivo@ciccio.it/bumbum"
the dovecot.conf namespace section is as follow:
namespace private { separator = / prefix = subscriptions = yes
}
namespace private { separator = / prefix = INBOX/ inbox = yes hidden = yes }
namespace shared { separator = / prefix = shared/%%u/ location = maildir:/var/utenti/%d/%%n/Maildir:INDEX=/var/utenti/%d/%n/Maildir/shared/%%u subscriptions = no list = children }
again... thank you very much for the help :)
Best regards Francesco
participants (2)
-
Rampage
-
Timo Sirainen