[Mailman-Users] Finding restrcit post to members options
Richard Barrett
R.Barrett at ftel.co.uk
Wed Jun 19 18:37:03 CEST 2002
At 09:45 19/06/2002 -0600, Kory Wheatley wrote:
>In Mailman is there a command line utility I can use to find out all the
>mailing lists that have the "Restrict post to members only" set as yes or 1?
>
>I've current installed Mailman 2.0.11 on Red Hat Linux 7.2 .
>
>--
>#########################################
>Kory Wheatley
>Academic Computing Analyst Sr.
>Phone 282-3874
>#########################################
>Everything must point to him.
The following short python script will do the job. Save in a file
start query-posting.py
------------------------------------------------------------
#! /usr/local/bin/python
# change the line above to where you have installed python
# save the file and chmod u+x it
# run as ./query-posting.py
import sys
# change path in the line below to reflect where you have installed Mailman
sys.path.append('/mailman/run')
from Mailman import Utils
from Mailman import MailList
from Mailman import Errors
for listname in Utils.list_names():
try:
mlist = MailList.MailList(listname, None)
except Errors.MMListError:
print 'Maillist error, MM unable to access list "%s"' % listname
else:
print 'List "%s" has member_posting_only=%d' % (listname,
mlist.member_posting_only)
end query-posting.py
------------------------------------------------------------
More information about the Mailman-Users
mailing list