Several users, same mailbox

Aki Tuomi aki.tuomi at open-xchange.com
Thu Feb 4 17:36:09 EET 2021


> On 04/02/2021 17:20 Adrian <adrian at aeolian.org.uk> wrote:
> 
>  
> Hello,
> 
> I have had Dovecot set up to use PAM authentication, as my current users
> all have system accounts on Debian.
> 
> I've just moved over to passwdfile authentication, because I want to
> add new users who won't have logins on the system.  This is working
> fine with my existing users.
> 
> Now, the problem is that I want the new users to share the SAME
> (Maildir) 'mailbox'.
> 
> Currently 10-mail.conf contains
> mail_location = maildir:/var/mail/%u:LAYOUT=fs
> 
> so this needs to be overridden, or I need some new way of mapping users
> to mail locations.
> 
> I could probably do it with symlinks from /var/mail/newuser
> to /var/mail/mail-location
> 
> but there may be a better way to do it than that.  I'd like it to be in
> a file, not needing mySQL or other database.
> 
> Lastly, are there any implications for locking?  These will be used
> rarely but if a second user logs in for the same mailbox they should
> get a lock error.
> 
> dovecot -n
> # 2.3.4.1 (f79e8e7e4): /etc/dovecot/dovecot.conf
> # Pigeonhole version 0.5.4 ()
> # OS: Linux 4.19.0-11-amd64 x86_64 Debian 10.7 ext4
> # Hostname: example.com
> disable_plaintext_auth = no
> mail_location = maildir:/var/mail/%u:LAYOUT=fs
> 
> Thanks in advance

How about using mailbox sharing instead?

https://doc.dovecot.org/configuration_manual/namespace/#dovecot-support-for-shared-mailboxes

Aki


More information about the dovecot mailing list