[Mailman-Users] NO hassles list script for RH 6 Linux
Garret Krampe
garret at satix.net
Mon Jan 10 01:53:33 CET 2000
NOTE: Edit the file and Change ADMIN and PASS
file: /home/mailman/bin/nlist
usage: ./nlist <listname> <admin> <passwd>
#!/bin/bash
LIST=$1
ADMIN=$2
PASS=$3
if [ "$#" = "1" ] ; then
ADMIN=fred_bloggs at muffy.org ##### ADMIN
PASS=muffy ##### PASS
echo "creating $LIST for $ADMIN passwrd: $PASS"
else
if [ "$#" = "3" ] ; then
echo "creating $LIST for $ADMIN passwrd: $PASS"
else
echo "$0 <listname> <admin> <passwd>"
echo "$0 AUTO creates a list, adds to /etc/aliases and restarts
sendmail"
echo "by Garret Krampe"
exit 5
fi
fi
exit
FOUND=`cat /etc/aliases | grep "^$LIST:"`
if [ "$FOUND" = "" ] ; then
echo "Checked /etc/aliases ... List name is OK"
else
echo "Checked /etc/aliases ... List name EXISTS "
echo "$FOUND"
exit 10
fi
if [ -f /home/mailman/lists/$LIST ] ; then
echo "List already exists ... use rmlist -a $LIST to remove it "
exit 20
else
echo "New list $LIST is OK to CREATE"
fi
rm -f /tmp/newaliases
su - mailman -c "bin/newlist $LIST $ADMIN $PASS $PASS | egrep -v 'Entry'
>>/tmp/newaliases"
su - mailman -c "echo $ADMIN | bin/add_members -n - -c n -w y $LIST "
cat /tmp/newaliases >>/etc/aliases
rm -f /tmp/newaliases
sendmail -biv
/etc/rc.d/init.d/sendmail stop
/etc/rc.d/init.d/sendmail start
echo "Done $LIST Created Password $PASS"
--
Regards,
Garret Krampe
(Managing Director)
---------------------
SATIX Pty Ltd.
http://www.satix.net
---------------------
ACN 090 976 015
Western Australia
"The Satellite Internet Exchange"
---------------------
(08) 6278 2649
0412 303 504 Mobile
ICQ 11 25 26 11
garret at satix.net
More information about the Mailman-Users
mailing list