Archive for April, 2008

Plugin for GNU Mailman – Derive Mailing List Users from Posix Group in LDAP

April 10th, 2008 No comments

See A Better Way to do LDAP sync with GNU Mailman for a better tool than this module. The module has bugs. — Edited 24 May 2008
This is a module for GNU Mailman that reads posix group members from an LDAP group, and uses them as members for the mailing list. It only reads – no write capability, and does no nested groups. It also has no encryption (though, if you need it, it shouldn’t be too hard to code).

The module is useful if you have Samba users with an OpenLDAP backend, since you wind up with a bunch of posix groups that way. This module assumes that the email address of the users is the same as their user name with the tacked on the end of it.

This module is derived from Karl A Krueger’s LDAP Membership Module, who deserves all the credit, fame and fortune for getting the ldap functionality to work at all. I deserve all the blame for any bugs in this module.

To use, copy to the mailman/Mailman directory (on CentOS/RedHat 5.1, this is /usr/lib/mailman/Mailman). About half way down the file is the line self.__mlist.owner = ''. Change the email address to whoever your admin is.

Now create your mailing lists as usual. However, the mailing list names must be identical to the ldap groups their membership is derived from. (In OpenLDAP, you can use the dynlist overlay to create dynamic groups to get around this limitation and create groups derived from other groups. If there is enough interest, I will post a how-to.)

Once you have created your list, copy to the mailing list’s directory (ie. /var/lib/mailman/lists/YOURLIST/), and modify the to match your setup. Rinse and repeat for each mailing list you wish to derive from a group.

This software is released under the GNU Public License with no warranty whatsoever and blah blah blah blah blah.

If you modify this module to add more functionality, please post.


Categories: Computer Stuff Tags: