Martin Schütte wrote:
Harold Pritchett wrote:
How do I list all of the members of all of my lists.

Thanks for the ideas.  Here's what I ended up with:

#!/bin/bash

USER=$(/usr/bin/id -un)

if [ $USER != root ] ; then
    echo This command must be run as root
    exit
fi

if [ $# -ne 1 ]
  then
  echo "Usage:"
  echo ""
  echo "delete_domain_from_all_lists addr"
  echo ""
  echo "Options:"
  echo ""
  echo "addr is the domain  address to remove. (required)"
  echo ""
  exit
fi

cd /usr/lib/mailman/bin

./list_lists -b | while read L
do
        ./find_member -l ${L} $1 |      \
                grep \@ |               \
                cut -d " " -f 1 >>      \
                /tmp/found-mailman
done

sort -u < /tmp/found-mailman > /tmp/found2-mailman
echo "The following userids will be deleted from ALL"
echo "Mailman mailing lists on this server."
echo
cat /tmp/found2-mailman
echo
echo Proper response must be '"Yes" (with a capital letter Y)'
echo Anything else and the delete wlil be aborted
echo -n "Continue [Yes|No]":" "
read response
echo

if [ "$response" == "Yes" ]; then
./remove_members --fromall --nouserack -f /tmp/found2-mailman
else
        echo Delete aborted...
fi

rm /tmp/found-mailman /tmp/found2-mailman


------------------------------------------------------
Mailman-Users mailing list Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to