[Mailman-Users] Script to Add lists (under RH6).
Garret Krampe
garret at satix.net
Mon Jan 24 20:40:10 CET 2000
You must be root to run this !
#!/bin/bash
# FILENAME: ~/mailman/bin/nlist
LIST=$1
ADMIN=$2
PASS=$3
if [ "$#" = "1" ] ; then
ADMIN=fred at bloggs.org
PASS=d21nnnnfwfjjga-+',,
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 rebuilds sendmail"
echo "by garret at satix.net"
exit 5
fi
fi
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 "
su - mailman -c "echo $USERNAME@$(hostname) | bin/add_members -n - -c n -w y
$LIST "
cat /tmp/newaliases >>/etc/aliases
newaliases
rm -f /tmp/newaliases
#/etc/rc.d/init.d/sendmail stop
#/etc/rc.d/init.d/sendmail start
#
# Send a message to the list so no one posts complaints of cron doing things
# with BOGUS archives again.
echo "TESTING OF $LIST" | mail -s "TESTING OF $LIST" $LIST
echo "Done $LIST Created Password $PASS"
Ron Keith wrote:
> Garrett,
>
> The script for installin mailman is way cool...
Tar Thanks :))
>
>
> However, I installed it by hand and am still having some difficulties in
> redhat 6...
>
> I have to go specifically to "host.xxx.edu/mailman/admin" to get anything on
> html.
>
Naturally ... ?? I'm not sure what you mean ... it's meant to work like that.
>
> Also, after receiving a test list I could not respond by email to it ..
You must be subscribed.
>
>
> any more how-to docs floating around?
This one may help you.
>
>
> thanks ...
>
> Ron Keith :-)
> Director of Information Technology
> Western State University School of Law
> (714) 738-1000 Ext 2953
--
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