Quoting Michael Paoli (Michael.Paoli@cal.berkeley.edu):
$ id uid=38(list) gid=38(list) groups=38(list) $ (umask 027 && withlist -l -r fix_url balug-test -u lists.balug.org) Importing fix_url... Running fix_url.fix_url()... Loading list balug-test (locked) Saving list Finalizing $
For those playing along at home:
linuxmafia:/var/lib/mailman/bin# ./fix_url.py Reset a list's web_page_url attribute to the default setting.
This script is intended to be run as a bin/withlist script, i.e.
% bin/withlist -l -r fix_url listname [options]
Options: -u urlhost --urlhost=urlhost Look up urlhost in the virtual host table and set the web_page_url and host_name attributes of the list to the values found. This essentially moves the list from one virtual domain to another.
Without this option, the default web_page_url and host_name values are used.
-v / --verbose Print what the script is doing.
If run standalone, it prints this help text and exits. linuxmafia:/var/lib/mailman/bin#
'withlist' ($MAILMAN_HOME/bin/withlist) is a 'General framework for interacting with a mailing list object.' It uses Python's interpreter to modify Mailman binary objects, either interactively or (as Michael did here) programmatically.
'-l' = lock the mailing list before futzing with it. (Good idea.)
'-r' = run the Python script named next on this command line, in this case fix_url.py. (It includes an instruction to unlock the mailing list at the end.)
My instance of withlist doesn't include a '-u' option. With it, you just specify the mailing list as ending parameter.
https://pythonhosted.org/mailman/src/mailman/commands/docs/withlist.html (Examples are interactive Python, not scripted.)