How do I share folders ?

chaouche yacine yacinechaouche at
Thu May 12 12:46:52 UTC 2016

There's also no need to create the shared namespace, so this part below is also unnecessary

namespace partage {
location = maildir:%%h:INDEX=~/%%u
prefix = shared.%%u.
separator = .
type = shared

I've commented it out, restarted dovecot, sharing still works.


----- Original Message -----
From: chaouche yacine <yacinechaouche at>
To: "dovecot at" <dovecot at>
Sent: Thursday, May 12, 2016 1:35 PM
Subject: Re: How do I share folders ?

Thanks Steffen. I went the quick'n'dirty way described at : and I must say it works fine as far as I have tested.

Here's what I did : 

$ cd /var/vmail/

$ ln -s /var/vmail/ .shared.a_chaouche at backup_algerian-radio_dz  <---- change "." to "_"

If I didn't change the dots they would appear as subfolder separators to dovecot (Maildir++ specs ? )

If you do this then a.chaouche at can do whatever he wants with a.chaouche at mailbox. We don't want this. We want him to only read the mail, not delete it. For this, he needs two permissions : reading of course and listing, because he needs to list the emails in order to choose which one he wants to read. If he doesn't have the listing permission then the MUA would get an error when it tries to list all the messages in the inbox.

We do this by adding a dovecot-acl file in the mailbox we want to share : 

root at messagerie[] /var/vmail/ # cat dovecot-acl
user=a.chaouche at lr
root at messagerie[] /var/vmail/ # 

This says that user a.chaouche at has the "l" right (listing) and the "r" right (reading).

You can make sure that it's setup as expected with the acl tool : 

root at messagerie[] ~ # doveadm acl get  -u a.chaouche at INBOX.shared.a_chaouche at backup_algerian-radio_dz 
ID                                Global Rights 
user=a.chaouche at        lookup read 
root at messagerie[] ~ # 

1. No need for SQL tables
2. No need for dictionary mappings
3. No need for doveadm acl commands



From: Steffen Kaiser <skdovecot at>
To: chaouche yacine <yacinechaouche at> 
Cc: "dovecot at" <dovecot at>
Sent: Wednesday, May 11, 2016 3:09 PM
Subject: Re: How do I share folders ?

Hash: SHA1

On Wed, 11 May 2016, chaouche yacine wrote:

> namespace inbox {

>  prefix = INBOX.
>  separator = .


>  type = private
> }
> namespace partage {
>  hidden = no
>  location = maildir:%%h:INDEX=~/%%u
>  prefix = shared.%%u.


>  separator = .
>  type = shared
> }

looks fine for me,

> I don't know if it's possible to share folders with the doveadm acl command ?
> root at messagerie[] ~ # doveadm acl debug  -u a.chaouche at shared/a.chaouche at
> doveadm(a.chaouche at Error: Can't open mailbox shared/a.chaouche at Mailbox doesn't exist: shared/a.chaouche at

you are using the dot as separator, that is:

shared/a.chaouche at backup. should spell

shared.a.chaouche at backup.

However, because there are dots in the username, too, this probably won't 
work, because Dovecot probably picks up "a" as username.

- -- 
Steffen Kaiser
Version: GnuPG v1


More information about the dovecot mailing list