[Mailman-Users] Removing admin email addresses
Spyro Polymiadis
spyropolymiadis at kromestudios.com
Tue Nov 20 06:02:38 CET 2007
Thanks Mark,
There are 2 admins on there.. 1 person is on All of them, and the person who left is on about half of them.
Which method would be best suited for that scenario?
Also, is any of the script destructive to the lists themselves? Ie, if it didn't run right or something it wouldn't affect the list accepting emails to it, or blowing away the rest of the list config?
Cheers
> -----Original Message-----
> From: Mark Sapiro [mailto:msapiro at value.net]
> Sent: Tuesday, 20 November 2007 3:29 PM
> To: Spyro Polymiadis; mailman-users at python.org
> Subject: Re: [Mailman-Users] Removing admin email addresses
>
> 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. owner1 at example.com, owner2 at example.com and
> owner3 at example.com, and you just want to remove owner2 from the list
> leaving the other 2, you can prepare a file containing the lines
>
> owner = ['owner1 at example.com',
> 'owner3 at example.com'
> ]
>
> 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
> ownerx at example.com 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('ownerx at example.com')
> print 'ownerx at example.com removed from %s' % mlist.real_name
> except ValueError:
> print 'ownerx at example.com 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 <msapiro at value.net> The highway is for gamblers,
> San Francisco Bay Area, California better use your sense - B. Dylan
This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.
More information about the Mailman-Users
mailing list