[Mailman-Users] How do I remove an owner from the command line?

Jim Tittsler jwt at onjapan.net
Tue Nov 9 13:25:12 CET 2004

On Nov 9, 2004, at 02:15, G James Jones wrote:

> Recently I got a request to remove the owner of a couple of our lists.
> I know that I can do this from the web, but is there a way to remove
> list owners from the command line?

You can use bin/withlist to manipulate the mailing list object.  Use 
the command line option to lock the list, use standard Python syntax to 
modify the object to suit (getting clues about variable names from the 
web interface and Defaults.py), and then Save() the modified object.  
(Making backup copies of the list object before making modifications is 
always a good idea.)

The 'owner' variable is a list of strings.

$ bin/withlist -l mylist
 >>> print m.owner
['owner1 at example.com', 'owner2 at example.com']
 >>> del m.owner[m.owner.index('owner1 at example.com')]
 >>> print m.owner
['owner2 at example.com']
 >>> m.owner.insert(0, 'newkid at example.com')
 >>> print m.owner
['newkid at example.com', 'owner2 at example.com']
 >>> m.Save()
 >>> {ctrl-D}

Run 'bin/withlist --h' for a description of how you can use the -r 
switch to make that into a command line script you can call with 
withlist.  (There are many examples in the mailman-users archives.)

You can also use bin/config_list (check both the -i and -o switches) to 
get human readable/editable information, rather than bin/withlist's 
more "programatic" style.

Jim Tittsler             http://www.OnJapan.net/      GPG: 0x01159DB6
Python Starship          http://Starship.Python.net/
Ringo MUG Tokyo          http://www.ringo.net/rss.html

More information about the Mailman-Users mailing list