On 9/20/06, Bretton Vine <[EMAIL PROTECTED]> wrote: > Is there an easy way to extract all the addresses which have been marked as > follows in a mailman list setup - but for all lists? > > i.e. extract all addresses which are listed in: > - banned from subscribing to the list > - automatically reject posts from $these_addresses > - automatically discard posts from $these_addresses > bin/dumpdb <list path>/config.pck will give you access to all the pickled data inside a config, which includes ban_list, discard_these_nonmembers, and reject_these_nonmembers.
Here's a bash hack using grep, tr, and cut to do it: #!/bin/bash DUMPDB=/usr/lib/mailman/bin/dumpdb LISTPATH=/var/lib/mailman/lists/ PCK=`$DUMPDB $LISTPATH/$1/config.pck | tr "\n" " " | tr -s " "` { for i in ban_list discard_these_nonmembers reject_these_nonmembers do echo $PCK | grep -Eo "'$i': \[[^]]*\]" | cut -d ':' -f 2 | tr -d "[][' ]" # | tr "," "\n" done; } | tr "," "\n" | tr -s "\n" | sort | uniq Put that in a file, e.g. 'script', and run: ./script <listname>. You'll probably need to fix DUMPDB= and LISTPATH=. You can wrap this in something like: for i in `list_lists -b` to automate over all lists. -- - Patrick Bogen ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users 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-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp