[Mailman-Users] Looking for the reverse of a "ban list"

Scott C. Villinski scott at villinski.com
Fri Dec 12 00:16:05 CET 2003


Scott C. Villinski wrote:

> I'd like to configure a set of domain names that are allowed to 
> subscribe to lists.  It could be the equivalent of a Ban list with some 
> domain names as exceptions.  Or just an "Allow List".  Any thoughts?  I 
> saw in the archives the messages about allow lists for sending messages 
> - but I don't think this will help me.
> 
> Thanks,
> 
> Scott

I'll reply to my own message since I figured out a way to do this.  If 
you want the reverse of the ban_list (for subscriptions), then what you 
can do is modify the $prefix/Mailman/MailList.py file, and on line 770 
(of Mailman v 2.1.3) starts the ban_list processing.  Change the ban=0 
to ban=1, and replace the original ban=1 with ban=0.  What this does is 
change the code from blocking a user that matches the pattern to only 
allowing users that match.  It's a hack - but it seems to work.  When 
you are done, you should only have made 3 changes (one ban=0 to ban=1, 
and two ban=1 to ban=0).  I was happy to see how simple it was.  So far 
I haven't seen any bad side effects of making this change - but maybe 
somebody will have and idea.

Scott




More information about the Mailman-Users mailing list