[Dovecot] acl, shared folders
Hi list, After spending quite some time to figure out how users can share folders I now hope someone of you could help me out. I am quite sure its just a stupid mistake/misunderstanding ... I am using Ubuntu 12.04 LTS with the shipped dovecot 2.0.19 When I login via telnet as user1 I get the following: 1 create folder1 1 OK Create completed. 2 setacl folder1 user2 rli 2 OK Setacl complete. 3 getacl folder1
- ACL "folder1" "user2" ilr "user1" lrwstipekxacd 3 OK Getacl completed. This seems fine. However, there is nothing listed in the account of user2. I think the mistake is in the namespace configuration of "location" or "prefix" Please help! Thanks! infoomatic
2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-45-generic x86_64 Ubuntu 12.04.3 LTS ext4 auth_username_format = %n disable_plaintext_auth = no mail_debug = yes mail_gid = vmail mail_home = /var/lib/vmail/home/%u mail_location = mdbox:/var/lib/vmail/mail/%u mail_plugins = " acl zlib fts fts_solr acl" mail_uid = vmail managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave imapflags mdbox_rotate_size = 64 M namespace { inbox = yes location = prefix = separator = / type = private } namespace { list = children location = mdbox:/var/lib/vmail/mail/%%n/mailboxes/shared/%n prefix = shared/%%n/ separator = / subscriptions = no type = shared } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { acl = vfile acl_shared_dict = file:/var/lib/vmail/shared-mailboxes fts = solr fts_solr = break-imap-search url=http://localhost:8080/solr/ sieve = ~/.dovecot.sieve sieve_dir = ~/sieve sieve_extensions = +imapflags zlib_save = bz2 zlib_save_level = 6 } protocols = " imap sieve pop3" service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-userdb { group = vmail user = vmail } } service managesieve-login { inet_listener sieve_deprecated { port = 2000 } } ssl_cert =
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 6 Jan 2014, Infoomatic wrote:
After spending quite some time to figure out how users can share folders I now hope someone of you could help me out. I am quite sure its just a stupid mistake/misunderstanding ... I am using Ubuntu 12.04 LTS with the shipped dovecot 2.0.19
I'm using v2.2, but it should apply to v2.0 as well.
This seems fine.
ACLs look fine.
However, there is nothing listed in the account of user2. I think the mistake is in the namespace configuration of "location" or "prefix" mail_home = /var/lib/vmail/home/%u mail_location = mdbox:/var/lib/vmail/mail/%u
namespace { inbox = yes location = prefix = separator = / type = private } namespace { list = children location = mdbox:/var/lib/vmail/mail/%%n/mailboxes/shared/%n prefix = shared/%%n/ separator = / subscriptions = no type = shared }
First note, that you use %u in the default location, but %n in the shared namespace definition. IMHO, you must stick to one, as only one is correct in your setup.
Second, reread http://wiki2.dovecot.org/SharedMailboxes/Shared Say user1 is sharing to user2, then your second namespace tells Dovecot to look for user1's mailboxes in /var/lib/vmail/mail/user1/mailboxes/shared/user2, you most likely need to replicate the default mail_location there with %'s doubled. Then you must decide, where each user's INDEX and CONTROL information is stored, or if flags are shared as well.
- From your current definition I would say, you need:
location = mdbox:/var/lib/vmail/mail/%%u:INDEX=~/shared/%%u
First part points to the directory of the user sharing the mailboxes, INDEX= places user-specific files of the user accessing shared mailboxes into his/her own hierarchie.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUsuqhV3r2wJMiz2NAQK+lAgAu46HGrSz3h8JGGM7hJpLHsuDkypHD8Xr ThbicfUC5CVOBk1xs3FkXM1gDecb8820f6JrDSe24slg6Lf7WWPdZdGEzc4f0Dnr btL4+ePrRrI+UyuRXtmm7hZu6JaUwJj+h8AOmpzg+swJokHWUGkY73vcFri+O2bt Dfd+HbZqmuCjJ+aauLKclEEGCQ45JHKC/LavxnBFPix48PoCEOrfaVrC3R9mFjGD 7CJbzgi2T2xJIdYzl+pvFRgEu8aT6AtgQo+4BE51PaLz/8XUE4NX5usV/kcLgu9O iz5VQcgKXFFoJ1HD37kcwNVkkAx67yDTVdDyLgvH9j0CYBpvnxDM4g== =WVlL -----END PGP SIGNATURE-----
Hi, Thanks a lot for the reply! A simple location = mdbox:/var/lib/vmail/mail/%%u was the solution. (my tests before with INDEX files obviously broke some stuff, so I just created empty users and it worked as it should with my initial config) best regards, infoomatic
Gesendet: Dienstag, 07. Januar 2014 um 08:19 Uhr Von: "Steffen Kaiser" skdovecot@smail.inf.fh-brs.de An: Infoomatic infoomatic@gmx.at Cc: dovecot@dovecot.org Betreff: Re: [Dovecot] acl, shared folders -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 6 Jan 2014, Infoomatic wrote: > After spending quite some time to figure out how users can share folders I now hope someone of you could help me out. I am quite sure its just a stupid mistake/misunderstanding ... I am using Ubuntu 12.04 LTS with the shipped dovecot 2.0.19 I'm using v2.2, but it should apply to v2.0 as well. > This seems fine. ACLs look fine. > However, there is nothing listed in the account of user2. I think the > mistake is in the namespace configuration of "location" or "prefix" > > mail_home = /var/lib/vmail/home/%u > mail_location = mdbox:/var/lib/vmail/mail/%u > namespace { > inbox = yes > location = > prefix = > separator = / > type = private > } > namespace { > list = children > location = mdbox:/var/lib/vmail/mail/%%n/mailboxes/shared/%n > prefix = shared/%%n/ > separator = / > subscriptions = no > type = shared > } First note, that you use %u in the default location, but %n in the shared namespace definition. IMHO, you must stick to one, as only one is correct in your setup. Second, reread http://wiki2.dovecot.org/SharedMailboxes/Shared Say user1 is sharing to user2, then your second namespace tells Dovecot to look for user1's mailboxes in /var/lib/vmail/mail/user1/mailboxes/shared/user2, you most likely need to replicate the default mail_location there with %'s doubled. Then you must decide, where each user's INDEX and CONTROL information is stored, or if flags are shared as well. - From your current definition I would say, you need: location = mdbox:/var/lib/vmail/mail/%%u:INDEX=~/shared/%%u First part points to the directory of the user sharing the mailboxes, INDEX= places user-specific files of the user accessing shared mailboxes into his/her own hierarchie. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBUsuqhV3r2wJMiz2NAQK+lAgAu46HGrSz3h8JGGM7hJpLHsuDkypHD8Xr ThbicfUC5CVOBk1xs3FkXM1gDecb8820f6JrDSe24slg6Lf7WWPdZdGEzc4f0Dnr btL4+ePrRrI+UyuRXtmm7hZu6JaUwJj+h8AOmpzg+swJokHWUGkY73vcFri+O2bt Dfd+HbZqmuCjJ+aauLKclEEGCQ45JHKC/LavxnBFPix48PoCEOrfaVrC3R9mFjGD 7CJbzgi2T2xJIdYzl+pvFRgEu8aT6AtgQo+4BE51PaLz/8XUE4NX5usV/kcLgu9O iz5VQcgKXFFoJ1HD37kcwNVkkAx67yDTVdDyLgvH9j0CYBpvnxDM4g== =WVlL -----END PGP SIGNATURE-----
participants (2)
-
Infoomatic
-
Steffen Kaiser