Shared Mailbox + LDAP Easy with this script

Allan Cassaro allan.cassaro at
Fri Jul 4 23:46:18 UTC 2014

Hello guys,

After some hours fighting with shared mailbox, I finally understand how it
works - and, realy, I can't believe how easy it is!

So, to help others like me and to improve the shared mailbox with Dovecot
this script does all the "hard work".

I don't know if this group permit attachments, so, let's the link:


===== From README file =====
This is a simple code to help with Dovecot Public Shared Mailbox function.
Just configure a public shared mailbox with ACLs, change the configuration
and run this program.

How it works:
1) The program connect to the LDAP server and fetch groups from it (with
ldap filter)
2) With groups, it fetches the members and owners (or any attribute you
3) It will walk into the "shared folder" folder base directory and:
  3.1) Rename any directory that was renamed in LDAP (based on entryUUID
ldap attribute);
  3.2) Create diretories and skeletion (new, cur and tmp) of any group that
exists in LDAP;
  3.3) Optionaly, remove any "orphan" directory (wihtout a ldap entrey);

dn: cn=Everyone,ou=Shared_Mailbox,
objectClass: labeledURIObject
objectClass: top
objectClass: groupOfURLs
cn: Everyone
labeledURI: ldap:///ou=Users,dc=example,dc=com?uid?one?(objectClass=person)
member: uid=user2,ou=users,dc=example,dc=com
member: uid=user3,ou=users,dc=example,dc=com
member: uid=user1,ou=users,dc=example,dc=com
member: uid=user.surname,ou=users,dc=example,dc=com
owner: uid=user4,ou=Users,dc=example,dc=com

This will create a folder tree like this:
With permission file (/path/toshared/.Everyone/dovecot-acl):
  user=user1 lr
  user=user.surname lr
  user=user4 lrwstipekxa

Hope this helps you! Enjoy.

Use cópia oculta (BCC ou CCO) e apague dados pessoais no campo da mensagem
ao encaminhar qualquer e-mail.

More information about the dovecot mailing list