Spyro Polymiadis wrote:
>
>We just have had one of our IT guys leave our company, and I was wondering if
>there was an easy (bulk, cli) way to remove/change the email address from the
>"List of Administrators" (2nd text box in General Options)
There are a couple of ways to do this. If the owners of all lists are
the same, e.g. [EMAIL PROTECTED], [EMAIL PROTECTED] and
[EMAIL PROTECTED], and you just want to remove owner2 from the list
leaving the other 2, you can prepare a file containing the lines
owner = ['[EMAIL PROTECTED]',
'[EMAIL PROTECTED]'
]
and run
#!/bin/bash
cd /path/to/mailman
for list in `bin/list_lists --bare`
do bin/config_list -i path/to/file/above $list
done
If the owner lists are different and you just want to remove
[EMAIL PROTECTED] from all lists in which it is an owner, you can put
the following script in Mailman's bin directory, naming it del_owner.py
def del_owner(mlist):
if not mlist.Locked():
mlist.Lock()
try:
mlist.owner.remove('[EMAIL PROTECTED]')
print '[EMAIL PROTECTED] removed from %s' % mlist.real_name
except ValueError:
print '[EMAIL PROTECTED] not owner of %s' % mlist.real_name
if not mlist.owner:
print 'list %s has no owners' % mlist.real_name
mlist.Save()
mlist.Unlock()
After saving the above as bin/del_owner.py, run
bin/withlist -a -r del_owner
Note that the file name is del_owner.py, but there is no .py in either
the withlist command or the function def.
--
Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
------------------------------------------------------
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/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp