Protocultura.cl

Ldap to Mailman

Ldap2Mailman is a little software I wrote to solve a particular problem. I was maintaining mailing lists for internal use. And all of the users where already defined in the company LDAP database. They even had the same groups definitions as we needed people in the mailing lists.

Strangely enough, mailman doesn't seem to be able to use LDAP as a base for the subscribers to it's lists. So i sat down and wrote a little script that does exactly that, it keeps the LDAP users in groups synchronized with lists of the same name.We currently run this script at lunchtime and in the night and have 200 users in 20 lists. It works great.

The script only acts on lists with the exact same name as a LDAP group. If there is a list the the same name as the LDAP group the script will take over, only subscribing users that are in the LDAP group. You can manually add or remove arbitrary emails by modifying the script configuration file, and you can block the script from touching lists that name a coincidence in the name, but should not be handled via LDAP.

The script doesn't touch the mailman database directly it just runs the mailman command-line tools to modify the lists. This script does not create lists either.

You can find the script and it's configuration file here: http://protocultura.cl/svn/ldap2mailman/ It doesn't require setting up, except having python installed (if you run mailman you already do). The configuration file should be located here: "/etc/mailman/mailman-list-ldap.conf" and self explicatively.

If you find any use for or questions about this script, send a note at "marijn at metronomo dot cl"