[Mailman-Users] using withlist
Todd Pfaff
pfaff at edge.cis.mcmaster.ca
Thu Nov 11 03:50:09 CET 1999
On Wed, 10 Nov 1999, Marc Merlin wrote:
> - Change random options in lists (like turn archiving on, and archives from
> private to public), because going through the web form for 100+ lists is
> very time consuming.
>
> Even if you don't have the answer to all of those, any you can give would
> help.
> Also, if I understand Christopher's message correctly, withlist can be used
> from the prompt, but python $prefix/bin/withlist -r module -l listname
> doesn't seem to work.
> Is that true? Does it mean I can't run withlist from shell scripts?
i haven't tried using the '-r module' option to withlist but i do use
withlist from shell scripts like the one below.
here's a quick example of how to write a simple shell script to change a
list option for all your lists (turn off send monthly reminders). i'm
not sure if the Unlock() is necessary but it doesn't hurt.
#!/bin/csh
set prefix=/home/mailman
cd $prefix/lists
foreach f (*)
python -i $prefix/bin/withlist -l $f << "EOF"
m.send_reminders=0
m.Save()
m.Unlock()
"EOF"
end
the biggest problem i have with using withlist is that the MailList class
is not clearly documented anywhere (that i know of) so i have to read the
python code to figure out what the variable names are. please correct me
if i'm wrong and there is somewhere i can find documentation about the
python classes in the mailman code.
i agree with chris and marc. it would be great to start keeping some of
these contributed utilities, either on the mailman web site or as part of
the mailman distribution.
--
Todd Pfaff \ Email: pfaff at mcmaster.ca
Computing and Information Services \ Voice: (905) 525-9140 x22920
ABB 132 \ FAX: (905) 528-3773
McMaster University \
Hamilton, Ontario, Canada L8S 4M1 \
More information about the Mailman-Users
mailing list