[Mailman-Users] configure lists with text file orprogramatically -> in a stream

Mark Sapiro mark at msapiro.net
Fri Aug 31 04:46:53 CEST 2012


Eric Smith wrote:

>This seems to be a nice solution;
>
>$ sudo config_list -o /dev/stdout <listname> |sed 's/advertised = .*/advertised = False/' -e 's/foo/bar/  |sudo config_list -i /dev/stdin <listname>


This is unduly complicated. The input to config_list need only contain
those things you want to change so you could just do

cat << EOF | sudo config_list -i /dev/stdin <listname>
advertised = False
bar
EOF


Also, see <http://www.msapiro.net/scripts/set_attributes>, a script
which processes things like

set_attributes "advertised = False" "foo = bar" listname

-- 
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