On Apr 26, 2022, at 3:01 AM, Ralf Hildebrandt 
<ralf.hildebra...@charite.de<mailto:ralf.hildebra...@charite.de>> wrote:

* Stephen J. Turnbull 
<stephenjturnb...@gmail.com<mailto:stephenjturnb...@gmail.com>>:
Ralf Hildebrandt writes:

How do I send an email to all list admins?

AFAIK, one by one, or you could make a mailing list for them.

IF you have access to the command-line of the server, this might help

I have a script I wrote (or rather I’m pretty sure I have one of Mark’s scripts 
that  I modified :-) that gets the name and address of every list on our system 
and exports a tab-delimited file with  the admin and moderator emails as 
separate lists .  Something similar could be used to just get all the admins 
out into a flat file, then use

./sync_members -w=no -g=no -d=no -a=no -f admins_file admins_list

to routinely generate the list and resynch it via cron, so you don’t have to 
worry about manually keeping it up to date.


#!/usr/bin/env python
'''
List info for internal links page
'''

import os
import time
DEBUG = 0
#print "List,Description,Owner(s),Moderator(s)"
def list_lister(mlist):
last = time.strftime('%m-%d-%Y',time.localtime(mlist.last_post_time))
owner = ''
out = open('./listoflists', 'a')
try:
if len(mlist.owner)>1:
owner = ';'.join(mlist.owner)
else:
owner = mlist.owner[0]
except IndexError:
owner = 'none'
moderator=''
try:
if len(mlist.moderator)>1:
moderator = ';'.join(mlist.moderator)
else:
moderator = mlist.moderator[0]
except IndexError:
moderator = 'none'
out.write( mlist.real_name + "\t" + mlist.description + "\t" + owner + "\t" + 
moderator + "\t" + last + "\n")
out.close()
print "processed %s" % (mlist.real_name)
return

(I use this script to provide the data for an easy-to-use web tool for our 
admins and moderators to access to do the parts they manage. Many of our lists 
membership management is done entirely outside of Mailman, leveraging our 
student data, campus LDAP, our own Active directory to manage ~60 lists that 
keeps up with people coming, going, changing departments, email addresses etc. )

---
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