[Mailman-Users] command line script for list creation

Detlef Neubauer detlef.neubauer at charite.de
Mon Jul 29 15:18:46 CEST 2002


Larry Guest <larry at guestfamily.com> writes:

> What I need is a script that not only makes the list for you (like
> "newlist") but will then ask you about the different option you can set for
> the list.  Things like, list name, list prefix, list footers, Kb messages
> size, members, etc.

I think i wouldt only go with the webinterface. Or you define it for
all new lists in mm-cfg.py.

> Also it would be great if it could show you what it
> will add to the /etc/alias file (sendmail) and then add it and run
> newaliases.

Take this an change it for your wishes. It's in german language i
think you understand it.

,----
| #!/bin/sh
| 
| LISTENNAME=$1
| LISTENADMIN=$2
| PASSWORT=$3
| 
| if test "$#" -ne 3; then
| 
|     echo "Wie soll die neue Liste heissen?"
|     read LISTENNAME
|     if test -z "$LISTENNAME"; then
|         echo "Bitte einen Listennamen angeben!"
|         exit 1
|     else
|         echo "Wie lautet die Mailadresse des Listenadmin?"
|         read LISTENADMIN
|         if test -z "$LISTENADMIN"; then
|             echo "Bitte die Mailadresse des Listenadmins angeben!"
|             exit 1
|         else
|             echo "Bitte geben Sie ein Passwort ein!"
|             read PASSWORT
|             if test -z "$PASSWORT"; then
|                 echo "Bitte ein Passwort eingeben!"
|                 exit 1
|             else
|                 newlist -o /etc/aliases.mailman "$LISTENNAME" "$LISTENADMIN" "$P
|                 sudo /usr/bin/newaliases
|             fi
|         fi
|     fi
|     
| else
|     newlist -o /etc/aliases.mailman "$LISTENNAME" "$LISTENADMIN" "$PASSWORT"
|     sudo /usr/bin/newaliases
| fi
`----

My MTA is Postfix and i use an extra aliases file for mailman lists.

,----
| mailman:~ # postconf -n
| alias_database = hash:/etc/aliases, hash:/etc/aliases.mailman
| alias_maps = hash:/etc/aliases, hash:/etc/aliases.mailman
`----

,----
| mailman:~ # ls -l /etc/aliases.mailman
| -rw-rw-r--    1 root     mailman     14415 Jul 18 11:22 /etc/aliases.mailman
`----

,----[ /etc/sudoers ]
| mailman mailman=NOPASSWD:/usr/bin/newaliases
`----


Please send no Cc. I answer only via the list.
Detlef Neubauer
-- 
.oO GnuPG Key auf http://www.keyserver.net/ Oo.





More information about the Mailman-Users mailing list