[Dovecot] Providing shared folders with multiple backend servers

Timo Sirainen tss at iki.fi
Mon Jan 9 21:16:09 EET 2012


On 9.1.2012, at 20.47, Sven Hartge wrote:

>>> Can "mmap_disable = yes" and the other NFS options be set per
>>> namespace or only globally?
> 
>> Currently only globally.
> 
> Ah, too bad.
> 
> Back to the drawing board then.

mmap_disable=yes works pretty well even if you're only using it for local filesystems. It just spends some more memory when reading dovecot.index.cache files.

> Implementing my idea in my environment using a cluster filesystem would
> be a very big pain in the lower back, so I need a different idea to
> share the shared folders with all nodes but still keeping the user
> specific mailboxes fixed and local to a node.
> 
> The imapc backed namespace you mentioned sounds very interesting, but
> this is not implemented right now for shared folders, is it?

Well.. If you don't need users sharing mailboxes to each others, then you can probably already do this with Dovecot v2.1:

1. Configure the user Dovecots:

namespace {
  type = public
  prefix = Shared/
  location = imapc:~/imapc-shared
}
imapc_host = sharedmails.example.com
imapc_password = master-user-password

# With latest v2.1 hg you can do:
imapc_user = shareduser
imapc_master_user = %u
# With v2.1.rc2 and older you need to do:
imapc_user = shareduser*%u
auth_master_user_separator = *

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
  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.


More information about the dovecot mailing list