2018-07-09 10:49 GMT+02:00 Thor Atle Rustad <thor.rustad@gmail.com>:
$ mailman shell -l junk@msapiro.net Welcome to the GNU Mailman shell The variable 'm' is the junk@msapiro.net mailing list
m.moderator_password from mailman.config import config m.moderator_password = config.password_context.encryp t('xxx123').encode('us-ascii') m.moderator_password b'$6$rounds=656000$SKMqTlPybIZSBjYB$wCga5qALCv8oobp4cDql2iKE g8T6qIgk8XEKYbkk9QXENeFQDHZ1M4AtmqfureYQDB5g.Az.nZPrWAr9N9g1N0' commit()
Thank you, this worked permanently. Now, how can I loop through all 700 lists and change the list password on all of them?
Thor
I think I can answer this myself. I found inspiration here:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/V...
and was able to do the following to change the moderator password on all lists:
'>>> from zope.component import getUtility
'>>> from mailman.interfaces.listmanager import IListManager
'>>> listmanager = getUtility(IListManager)
'>>> for mlist in listmanager.mailing_lists:
'... mlist.moderator_password = config.password_context.encrypt('secret_pa$$word').encode('us-ascii')
'... commit()
'... print(mlist.list_name)
Seems to work :-)