Is there a way to create multiple lists at once via mailman script?

Hello,
I am wondering if there is a way to have several mailman lists created at once via command line. I am talking about 100 lists or so. Otherwise creating them through the GUI would take forever.
Maybe creating a file with list name, password,etc and passing that file to the create binary?
Anyone have any experience with that?
Thanks in advance
Victor MontaƱez

On 09/16/2015 03:53 PM, Montanez, Victor wrote:
I am wondering if there is a way to have several mailman lists created at once via command line. I am talking about 100 lists or so. Otherwise creating them through the GUI would take forever.
Maybe creating a file with list name, password,etc and passing that file to the create binary?
Create your file with multiple lines of the form
list1 owner@example.com password
Assume it's named 'lists'
Create a script like
#! /bin/bash exec 5</path/to/lists while read -u 5 list owner passwd; do /path/to/mailman/bin/newlist -q $list $owner $passwd done
Then either give it +x permission and run it with
/path/to/script
or run it via
bash /path/to/script
This will create the lists without sending email notifications to the owners. If you want the notifications and your Mailman is 2.1.20 or newer, you can replace the newlist -q option with -a.
If you want the notifications and your Mailman is older, you can make the newlist command in the script
/path/to/mailman/bin/newlist $list $owner $passwd </dev/null
each invocation of newlist will produce a 'Hit enter to notify listname owner...' prompt on stdout but the response will be read from /dev/null so you don't have to 'Hit enter' for each one.
See 'bin/newlist --help' for more info.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Montanez, Victor