[Mailman-Users] OK, back and running... how do I add_users via batch files

John van V apps_adm at puny.vm.com
Thu Aug 10 00:17:27 CEST 2000


Hi, the add_members only works w/ a tty, how to do I add them with a batch file.

I am trying to create a single sign-on system for shell accounts, mail services and mailing lists.

I would also like to be able to create a cgi allowing users to create their own mailing lists.  It would have to be
Suid mailman, which I am loath to do, but egroups, for instance makes all their money doing that.

This qmail script works, but must be run as root.  In batch I would have to write an expect script, something I have not
done for a year but that language kinda rocks.

############################
#!/bin/sh

usage_fxn(){
echo 'newlist <listname>'
exit
}

[ "$1" = 'usage' ] && usage_fxn

[ $# != 1 ] && usage_fxn

su - mailman -c " /home/mailman/bin/newlist $1 "

set -x
cd ~qmaild/alias
pwd

if [ $# = 1 ]; then
    i=$1
    echo Making links to $i...
    echo "|preline /home/mailman/mail/wrapper post $i" > .qmail-$i
    echo "|preline /home/mailman/mail/wrapper mailowner $i" > .qmail-$i-admin
    echo "|preline /home/mailman/mail/wrapper mailowner $i" > .qmail-$i-owner
    echo "|preline /home/mailman/mail/wrapper mailowner $i" > .qmail-owner-$i
    echo "|preline /home/mailman/mail/wrapper mailcmd $i" > .qmail-$i-request
fi

cd -
######################





More information about the Mailman-Users mailing list