[Mailman-Developers] creating a list of moderators

Joshua Ginsberg jag at fsf.org
Wed Jan 11 20:48:34 CET 2006


Something like this?


import cPickle, os, os.path, sys

MAILMANHOME='/var/mailman' ;# change to suit
sys.path.append(MAILMANHOME)
moderators = []

for dir in os.listdir(os.path.join(MAILMANHOME, 'lists')):
  o = cPickle.load(open(os.path.join(MAILMANHOME, 'lists', dir, 'config.pck')))
  for email in o['moderator']:
    email in moderators or moderators.append(email)

return moderators



On Wed, 2006-01-11 at 12:41 -0500, David Benson wrote:
> Hi,
>  
> I'm a site administrator and I'd like to be able to automatically compile a
> list of 'list moderators' so that I can send them all announcements.  I
> can't find a way to do this in the current version, and I saw similar
> functionality being requested on the 'wishlist', so I assume that it has yet
> to be implemented.
>  
> I'm new to Mailman, but I'd like to try writing a script to do this.  Can
> anyone advise me on how to go about it/where to start?
>  
> Any ideas?
>  
> Many thanks!
>  
> 
> Dave Benson
> _______________________________________________
> Mailman-Developers mailing list
> Mailman-Developers at python.org
> http://mail.python.org/mailman/listinfo/mailman-developers
> Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
> Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
> Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/jag%40fsf.org
> 
> Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp
> 
-- 
Joshua Ginsberg <jag at fsf.org>
Free Software Foundation - Senior Systems Administrator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/mailman-developers/attachments/20060111/de2de163/attachment.pgp 


More information about the Mailman-Developers mailing list