Forwarded message:
>From: Thomas Gramstad <thomasg@ifi.uio.no>
>Subject: Global unsub?
>
>I know that a zubscriber can unzub themself from all the lists at a
>site with the unzubscribe * command. But can I unzub a given
>zubscriber from all lists with one command?
I don't think that MD supports this, but I use the following shell
script and it is very handy. Note that for each list it actually finds
the password. You must of course run this from an account that has read
access on the password files.
Bill
#!/bin/sh
# Unsubscribe the arguments from all lists
PROG=`basename $0`
DIR=/.../majordomo/Lists
EXCLUDE=test
PROCESS="Mail lists"
ACTION=unsubscribe
OPTIONS=
if [ $OPTIONS ]
then
USAGE="Usage: $PROG [-$OPTIONS] name [...]"
else
USAGE="Usage: $PROG name [...]"
fi
while getopts h$OPTIONS x
do
case $x in
h|\?) echo "$USAGE"
echo "unsubscribe all arguments from all lists"
echo "\t$PROG -D\tDebug"
exit 1 ;;
*) echo "$USAGE" ; exit 1 ;;
esac
done
shift `expr $OPTIND - 1`
case $# in
0) echo "Nothing done"
echo "$USAGE"
exit 1 ;;
*)
cd $DIR
FILES=`\ls | grep -v '\.' | grep -v $EXCLUDE`
(
for i
do
for L in `grep -i -l $i $FILES`
do
PASSWORD=`cat $L.passwd`
echo "approve $PASSWORD $ACTION $L $i"
done
done
echo end
) | $PROCESS
;;
esac
exit 0
--
Bill Silvert, Habitat Ecology Section, Bedford Institute of Oceanography,
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2, Tel. (902)426-1577
|
|