Shared Mailbox + LDAP Easy with this script
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: https://sites.google.com/site/allancassaro/mkshared.tar.gz
Enjoy!
===== 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 file and run this program.
How it works:
- The program connect to the LDAP server and fetch groups from it (with ldap filter)
- With groups, it fetches the members and owners (or any attribute you want);
- 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);
Example: dn: cn=Everyone,ou=Shared_Mailbox, dc=example,dc=com 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: /path/toshared/.Everyone /path/toshared/.Everyone/new /path/toshared/.Everyone/cur /path/toshared/.Everyone/tmp 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.
participants (1)
-
Allan Cassaro