[Dovecot] Multiple user sharing a single mailbox
tss at iki.fi
Fri Jun 14 05:55:19 EEST 2013
On 14.6.2013, at 5.38, Jonathon Price <jon at 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).
More information about the dovecot