[Dovecot] Multiple user sharing a single mailbox
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@site1.example.com | /mail/home/site1.example.com/all | /mail/mailstorage/site1.example.com/all
user1@site1.example.com | /mail/home/site1.example.com/user1| /mail/mailstorage/ site1.example.com/all
user2@site1.example.com | /mail/home/site1.example.com/user2| /mail/mailstorage/ site1.example.com/all
user1@site2.example.com | /mail/home/site2.example.com/user1| /mail/mailstorage/ site2.example.com/user1
user2@site2.example.com | /mail/home/site2.example.com/user2| /mail/mailstorage/ site2.example.com/user2
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?
thanks,
Jon
On 14.6.2013, at 5.38, Jonathon Price jon@jprice.me wrote:
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.
Should work, as long as there aren't username-specific things such as sql-dict quota where each user is updating their own quota. But maybe do this an easier way and have passdb lookup simply change the username to the shared user? You can do this by having the passdb return "user" field that contains the shared username.
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?
The \Seen flag could be made per-user, preferrably with v2.2's INDEXPVT setting. Otherwise you'd have to use maildir and you'd have to manually create a dovecot-shared file to each such maildir (every time a new one is created).
On Jun 13, 2013, at 7:55 PM, Timo Sirainen tss@iki.fi wrote:
The \Seen flag could be made per-user, preferrably with v2.2's INDEXPVT setting. Otherwise you'd have to use maildir and you'd have to manually create a dovecot-shared file to each such maildir (every time a new one is created).
Is there some documentation on the semantics of INDEXPVT? I checked the Wiki page http://wiki2.dovecot.org/SharedMailboxes/Public and also performed a full-text search for "INDEXPVT", but couldn't find anything.
-- Frerich Raabe - raabe@froglogic.com www.froglogic.com - Multi-Platform GUI Testing
Don't think the passdb would work as I was planning on using LDAP for authentication. Also if this option was used I'm assuming it would effect the username used in any logging.
If having a single seen flag for the mailboxs was preferred, i.e. no private indexes. Is there a recommended mail store format that would work best with higher levels of concurrent access?
Thanks for the help, Jon
On Thu, Jun 13, 2013 at 10:41 PM, Frerich Raabe raabe@froglogic.com wrote:
On Jun 13, 2013, at 7:55 PM, Timo Sirainen tss@iki.fi wrote:
The \Seen flag could be made per-user, preferrably with v2.2's INDEXPVT setting. Otherwise you'd have to use maildir and you'd have to manually create a dovecot-shared file to each such maildir (every time a new one is created).
Is there some documentation on the semantics of INDEXPVT? I checked the Wiki page http://wiki2.dovecot.org/SharedMailboxes/Public and also performed a full-text search for "INDEXPVT", but couldn't find anything.
-- Frerich Raabe - raabe@froglogic.com www.froglogic.com - Multi-Platform GUI Testing
On 14.6.2013, at 22.31, Jonathon Price jon@jprice.me wrote:
If having a single seen flag for the mailboxs was preferred, i.e. no private indexes. Is there a recommended mail store format that would work best with higher levels of concurrent access?
Anything but mbox works fine.
participants (3)
-
Frerich Raabe
-
Jonathon Price
-
Timo Sirainen