[Mailman-Users] get all lists' subscribe_policy

Mark Sapiro msapiro at value.net
Mon Oct 24 17:53:04 CEST 2005

Xiaoyan Ma wrote:

>I need a script that gets all lists' subscribe_policy/unsubscribe_policy and outputs to a file. 
> Similar to lists_admins, but instead of getting administrator's email address, it gets 
>subscribe_policy.  I looked into MailList.py, config_list, list_lists and withlist ... but have 
>not figured out how to do it.  Can someone point me to the right direction?

Since you want something similar to list_admins, look at that. In
particular find

       owners = COMMASPACE.join(mlist.owner)
       print _('List: %(listname)s, \tOwners: %(owners)s')

You don't need COMMASPACE.join(mlist.owner) because subscribe policy is
a number, not a list of e-mail addresses, but if you are going to use
the i18n._ method you do have to assign mlist.subscribe_policy to a
variable or you can just

       print 'List: %s, \tPolicy: %d' % (listname,

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