Great Circle Associates Majordomo-Users
(November 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: mkdigest, etc.
From: bill @ biome . bio . dfo . ca (Bill Silvert)
Date: Tue, 28 Nov 1995 14:20:19 -0400 (AST)
To: Majordomo-Users @ GreatCircle . COM (Majordomo Users)

>> >>>> mkdigest test PASSWORD
>
>This may be your problem.  Try 'mkdigest test-digest PASSWORD'.  Every 
>now and then I get careless and forget the -digest and get the same errors.

I suggested the same thing.  The following file may help with routine
administrative tasks like this.  The command "mj -d test" will make a
digest for list test.  It has a couple of convenient hacks to use the
right syntax and to find the password for you.

Use the -D parameter to see what it does.  Note that our mail program is
called "Mail", you may need to change it to "mail".  Requires getopts.

#!/bin/sh
# Shell script for Majordomo administration
PROG=`basename $0`
DIR=/usr/local/majordomo/Lists
LIST=
ERROR=yes
PROCESS="Mail lists"
OPTIONS=d:l:su
if [ $OPTIONS ]
then
	USAGE="Usage: $PROG [-$OPTIONS] file [...]"
else
	USAGE="Usage: $PROG file [...]"
fi
while getopts h$OPTIONS x
do
	case $x in
	D)	PROCESS=cat ;;
	d)	DLIST=`basename $OPTARG -digest`
		DIGEST=$DLIST-digest
		PASSWORD=`cat $DIR/$DIGEST.passwd`
		echo "mkdigest $DIGEST $PASSWORD" | $PROCESS
		echo "Making digest for $DIGEST"
		ERROR=no
		;;
	l)	LIST=$OPTARG ;;
	s)	ACTION=subscribe
		;;
	u)	ACTION=unsubscribe
		;;
	h|\?)	echo "$USAGE" ; exit 1 ;;
	*)	echo "$USAGE" ; exit 1 ;;
	esac
done
shift `expr $OPTIND - 1`

case $# in
0)	if [ $ERROR = yes ]
	then
		echo "Nothing done"
	fi
	exit 2 ;;
*)
	if [ "x$LIST" != "x" -a "x$ACTION" != "x" ]
	then
		PASSWORD=`cat $DIR/$LIST.passwd`
		echo "$ACTION $LIST: $*"
		(
		for i
		do
			echo "approve $PASSWORD $ACTION $LIST $i"
		done
		) | $PROCESS
	else
		echo "Both LIST and ACTION must be specified"; exit 1
	fi
	;;
esac
exit 0



-- 
Bill Silvert, Habitat Ecology Section, Habitat Science Division
Bedford Institute of Oceanography, P. O. Box 1006
Dartmouth, Nova Scotia, CANADA B2Y 4A2
HED runs a WWW server at URL=http://hed.bio.dfo.ca


Indexed By Date Previous: Re: Proper Permissions
From: Dale Cook <cdm@hyperk.com>
Next: unknown mailer error 29
From: Fuzzy <fuzzy@ASARian.org>
Indexed By Thread Previous: problem approving mail with mime attachments
From: Michael Cowden <cowden@leithaus.leitess.com>
Next: unknown mailer error 29
From: Fuzzy <fuzzy@ASARian.org>

Google
 
Search Internet Search www.greatcircle.com