On Tue, 2004-11-09 at 06:25, Jim Tittsler wrote:
> 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
> ['[EMAIL PROTECTED]', '[EMAIL PROTECTED]']
> >>> del m.owner[m.owner.index('[EMAIL PROTECTED]')]
> >>> print m.owner
> ['[EMAIL PROTECTED]']
> >>> m.owner.insert(0, '[EMAIL PROTECTED]')
> >>> print m.owner
> ['[EMAIL PROTECTED]', '[EMAIL PROTECTED]']
> >>> 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.)
>
That looks like the stuff I was looking for. I will give it a shot.
>
> 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.
One question with using bin/config_list? If I output the original
configuration with -o, then change the configuration (adding and/or
removing owners and moderators) and then use the modified config file
with bin/config_list -i to apply the new configuration back to the list,
will I damage anything?
config_list looks like an easier route until my python abilities get up
to being able to extend (using withlist) mailman for my personal needs.
I just want to make sure that importing a modified config over an
existing config isn't going to cause more headaches than it relieves.
Thanks for the prompt help.
Jim Jones
--
Jim Jones
Systems Analyst
Computer Center
University of Southern Indiana
Phone: (812) 461-5402
------------------------------------------------------
Mailman-Users mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/