[Mailman-Users] creating a list of moderators

Matt Emerson rme at grc.nasa.gov
Wed Jan 11 19:32:54 CET 2006


On Jan 11, 2006, at 12:34 PM, David Benson wrote:

> I'm a site administrator and I'd like to be able to send messages  
> out to all of my moderators at once.  Does the current version of  
> Mailman have functionality to do this, i.e. can it automatically  
> generate a 'list' of moderators? ...or will I have to write my own  
> code to make it happen?

We created a mailing list called "list-owners", which we update once  
a day via the following command.

/usr/share/mailman/bin/withlist -q -a -r printowners | tr A-Z a-z |  
sort | uniq | /usr/share/mailman/bin/sync_members -w=no -g=no -f -  
list-owners >>/tmp/list-owner-updates

The printowners helper script, which we put in /usr/share/mailman/bin/ 
printowners.py, contains the following.  (It's probably better to  
keep local stuff out of Mailman's bin directory, but since I'm a  
python caveman, I just put the local script there anyway.)

#!/usr/bin/python

def printowners(m):
     for i in m.owner:
         print i

If you want the list moderators (distinct from the list owners),  
you'd want to use m.moderator in lieu of m.owner.

-- 
Matt Emerson
rme at grc.nasa.gov





More information about the Mailman-Users mailing list