[Dovecot] Providing shared folders with multiple backend servers

Timo Sirainen tss at iki.fi
Mon Jan 9 21:38:59 EET 2012


On 9.1.2012, at 21.31, Sven Hartge wrote:

> ,----
> | # User's private mail location
> | mail_location = mdbox:~/mdbox
> |
> | # When creating any namespaces, you must also have a private namespace:
> | namespace {
> |   type = private
> |   separator = .
> |   prefix = INBOX.
> |   #location defaults to mail_location.
> |   inbox = yes
> | }
> |
> | namespace {
> |   type = public
> |   separator = .
> |   prefix = #shared.

I'd probably just use "Shared." as prefix, since it is visible to users. Anyway if you want to use # you need to put the value in "quotes" or it's treated as comment.

> |   location = imapc:~/imapc-shared
> |   subscriptions = no

list = children here

> | }
> |
> | imapc_host = m-st-sh-01.foo.bar
> | imapc_password = master-user-password
> | imapc_user = shareduser
> | imapc_master_user = %u
> `----
> 
> Where do I add "list = children"? In the user-dovecots shared namespace
> or on the shared-dovecots private namespace?

Shared-dovecot always has mailboxes (at least INBOX), so list=children would equal list=yes.

> 
>> 2. Configure the shared Dovecot:
> 
>> You need master passdb that allows all existing users to log in as "shareduser" user. You can probably simply do (not tested):
> 
>> passdb {
>> type = static
>> args = user=shareduser pass=master-user-password
>> master = yes
>> }
> 
>> The "shareduser" owns all of the actual shared mailboxes and has the
>> necessary ACLs set up for individual users. ACLs use the master
>> username (= the real username in this case) to do the ACL checks.
> 
> So this is kind of "backwards", since normally the imapc_master_user would be
> the static user and imapc_user would be dynamic, right?

Right. Also in this Dovecot you want a regular namespace without prefix:

namespace inbox {
  separator = /
  list = yes
  inbox = yes
}

You might as well use the proper separator here in case you ever change it for users.


More information about the dovecot mailing list