[Mailman-Users] ldap queries......

Mark Sapiro msapiro at value.net
Tue Feb 1 02:50:19 CET 2005


Jeffrey Borkent wrote:
>
>Here at the University of Adelaide we have several very large lists that
>are generated by ldap queries. A module offered to us by Karl A. Krueger
>at the Woods hole Oceanographic Institute works a treat, and generates
>the lists based on ldap search criteria.

Presumably, this is a Member Adaptor module

>What we wish to do now is restrict who can send to the list without
>moderator intervention. Take for example the all student list here,
>currently we have another ldap entry which authorises posting to this
>list. 
>
>My question is where in the current Mailman code ( v2.1.5 ) can we place
>some code to check this ldap authorisation entry?

Whatever Member Adaptor is in use for a list defines a function
getMemberOptions(self, member, flag) in that module. In your case,
this should be in the module referred to above. You need to arrange
that whenever this is called with flag = mm_cfg.Moderate, it returns
True (or 1) if member should be moderated and False (or 0) if member
should not be moderated.

I.e. you need to place your code in getMemberOptions() in your Member
Adaptor.

Note: your Member Adaptor module may be called extend.py and be
installed in a lists/<listname>/extend.py file for each list for which
it applies or it may have some other name and be invoked globally in
MailList.py in place of OldStyleMemberships()

--
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list