A couple python scripts I've written to compare IMAP Mailbox names and OpenLDAP usernames to determine which Mailboxes are allowed to be deleted.
Some scripts do multiple tasks, the most important one is testldapcompare.py, that's where most of the python LDAP integration exists.
The query to LDAP is pretty straight forward after installing the python-ldap module. Make sure you have the correct LDAP base DN and query, as to run scripts on the correct filter.
Must have a file named everymailboxsize.txt
which is a file that lists every IMAP mailbox home folder name, separated by newline characters.
Scripts will probably be consolidated at some point, but for now, scripts should be run in this order:
1. testeverymailboxsize.py
2. testactivetomailbox.py
3. testldapcompare.py
- Python 2.7
- python-ldap module
- OpenLDAP 2.4 (Version shouldn't matter, only concerned with LDAP schema)
- Henry Luo