Well some guy named Mark supported one method in the past 8-) (which I found 
googling ‘how to disable a mailman 2 list’ because I’d like to know how, too, 
since we do occasionally have need to do this.)

https://mail.python.org/pipermail/mailman-users/2010-September/070283.html

Since he appears to have shell access using the script you gave would let him 
move the list directory to someplace like /path/to/mailman/lists/[listname] to 
/path/to/mailman/disabled lists/[listname]

That would let him re-enable the list without having to recreate everything.

On May 27, 2022, at 11:49 AM, Mark Sapiro 
<m...@msapiro.net<mailto:m...@msapiro.net>> wrote:

On 5/27/22 10:22, John Lake wrote:
Our security department has asked me to canvas all of our lists (4,237!)—and if 
a list owner value is not defined they want me to disable the list.
  1.  Can I combine the list_lists and list_owners commands to output both 
(hopefully linked) values as a .csv?

`list_owners -w` will list the owners by list name. If a list has no owners, 
only the list name will be output for that list. You could then process that 
file to identify the lists with no owners.


  2.  Is there a script that any of you have leveraged to batch disable lists 
without a defined owner?


What do you mean by `disable`?

A withlist script like
```
def no_owner(mlist)
   if len mlist.owner == 0:
       if not mlist.Locked:
           mlist.Lock
       print('List %s has no owners, disabling.' % mlist.real_name)
       <code here to disable list. I could provide it if I knew what that meant>
       mlist.Save()
       mlist.Unlock()
```
saved as no_owner.py in Mailman's bin/ directory and run via
```
bin/withlist -a -r no_owner
```
You could omit the code
```
       if not mlist.Locked:
           mlist.Lock
       <code here to disable list. I could provide it if I knew what that meant>
       mlist.Save()
       mlist.Unlock()
```
I.e., just leave the print statement in the `if len mlist.owner == 0:` clause 
to just print the names of lists with no owner.

--
Mark Sapiro <m...@msapiro.net<mailto:m...@msapiro.net>>        The highway is 
for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list -- 
mailman-users@python.org<mailto:mailman-users@python.org>
To unsubscribe send an email to 
mailman-users-le...@python.org<mailto:mailman-users-le...@python.org>
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
  https://mail.python.org/archives/list/mailman-users@python.org/

--
Bruce Johnson
University of Arizona
College of Pharmacy
Information Technology Group

Institutions do not have opinions, merely customs

------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
    https://mail.python.org/archives/list/mailman-users@python.org/

Reply via email to