[Dovecot] Multiple user sharing a single mailbox

Jonathon Price jon at jprice.me
Fri Jun 14 05:38:23 EEST 2013

I'm designing a system where some but not all groups of users want to share
a single mailbox, i.e the user will not have there own inbox. I think this
is possible by setting up a user database that returns the same mail
location and possible the same home directory. This sharing would only
occur in a single domain.

Example User Database

UserID | home | mail

all at site1.example.com      | /mail/home/site1.example.com/all
| /mail/mailstorage/site1.example.com/all

user1 at site1.example.com | /mail/home/site1.example.com/user1| /mail/mailstorage/

user2 at site1.example.com | /mail/home/site1.example.com/user2| /mail/mailstorage/

user1 at site2.example.com | /mail/home/site2.example.com/user1| /mail/mailstorage/

user2 at site2.example.com | /mail/home/site2.example.com/user2| /mail/mailstorage/

In this example all of site1.example.com users share a single mailbox, and
site2.example.com users each have there own mailbox. Should the home
directory also be shared, I read the comment that they should never be
shared but wasn't sure if that still applied when the mailbox is the same
path. For groups that are sharing a mailbox there would likely be a
relatively low number of users concurrently logged in, say less than 10.

For clustering we are currently limited to NFS mail storage. I was planning
on using director setup so that the hashing/sharding is performed on the
domain only, so all users for a domain will end up on a single node. At
this stage clustering is mainly for high availability not performances.

Lastly I'm concerned about possible issues with locking on the mailbox
files and indexes. Will one of the mail formats reduces this risk, we can
use any format as all mail will be written by Dovecot. Would giving each
user there own index location help? and I assume this would mean that each
user would see there own flags like read status?

Does this setup sound ok, are there aspects that should change?



More information about the dovecot mailing list