[Mailman-Users] Couple of Questions

mailman at tux.org mailman at tux.org
Tue Sep 10 22:09:02 CEST 2002


On Tue, 10 Sep 2002, Jeffrey M. Johnson wrote:

> I have an individual who moderatored about a dozen lists who is
> changing positions and is no longer going to moderate these lists.
> Is there any tools that I can use that will scan all the Databases and
> tell me which lists they moderate or produce just the moderators for
> the lists with a single command.

Sure; try:

for i in `list_lists | grep ' - ' | sed 's/^ *\(.*\) - .*$/\1/'`; do \
          echo -n "$i		";                                   \
          config_list -o - $i | grep '^owner = ' |                   \
          sed 's/^owner = //' |                                      \
          sed 's/\[//'        |                                      \
          sed 's/\]//'        |                                      \
          sed "s/'//g"; done

That's two TABs after $i between the quotes on the second line ...
but your favorite whitespace formatting will work.  Likewise, adjust
the sed commands to your liking.

To make this even handier, I have a shell script called list_owners that
has as its only command the above command; I keep it in the Mailman bin
directory so it is always within reach.

config_list (with -o) dumps out the entire config for a given list, with
extensive annotation (the syntax is -o FILE; '-' stands in for stdout).
config_list also has a -i switch for updating the config of a given list
from a file like the file it dumps out.  config_list -h for more info.

Hope that helps.

- Andrew

  ----------------------------------------------------------------
  Mailman Administrator   -   http://www.tux.org/mailman/listinfo/





More information about the Mailman-Users mailing list