[Mailman-Users] Change one config var for all Lists on server

Mark Sapiro mark at msapiro.net
Wed Jan 2 06:23:34 CET 2013


On 1/1/2013 7:41 PM, Sriram Karra wrote:
> I only wish to increase the max message size for all lists
> (DEFAULT_MAX_MESSAGE_SIZE)
> 
> What's the simplest way to do this? I guess I could
> 
> (a) iterate over all lists
> (b) dump the configuration using the config_list -o command
> (c) replace the DEFAULT_MAX_MESSAGE_SIZE value using sed or something
> (d) reload the configuration with config_list -i command
> 
> I would like to believe there is a simpler way to do something as basic as
> this. What am I missing?


First of all, you are confusing DEFAULT_MAX_MESSAGE_SIZE with a list's
max_message_size. DEFAULT_MAX_MESSAGE_SIZE is a Defaults.py/mm_cfg.py
setting that is used to set max_message_size for a list when the list is
created. The list's max_message_size is apparently what you want to change.

The next thing you are missing is that settings not mentioned in the
input file to bin/config_list are unchanged, so all you need is a one
line input file

max_message_size = ...

and run config_list over all lists with that input.  There are other
ways to do this using bin/withlist too.

In your case, you could do something like

#!/bin/bash
cd /path/to/mailman
input=`mktemp`
echo "max_message_size = ..." > $input
for list in `bin/list_lists -- bare`; do
   bin/config_list -i $input $list
done
rm $input

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list