Nov. 19, 2026
1:53 a.m.
On 11/18/26 17:25, Mark Sapiro wrote:
On 11/18/26 16:07, Juergen Dollinger wrote:
How do I set the list password from command line?
Use
mailman shellwith an interaction like this:$ mailman shell -l list.example.com Welcome to the GNU Mailman shell Use commit() to commit changes. Use abort() to discard changes since the last commit. Exit with ctrl+D does an implicit commit() but exit() does not. The variable 'm' is the list.example.com mailing list >>> print(m.moderator_password) None >>> m.moderator_password = 'some_password' >>> print(m.moderator_password) some_password >>> commit()
Actually, the above is not correct because the password needs to be encrypted. The whole interaction should be:
$ mailman shell -l list.example.com
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
The variable 'm' is the list.example.com mailing list
>>> from mailman.config import config
>>> print(m.moderator_password)
None
>>> m.moderator_password = config.password_context.encrypt('some_password')
>>> print(m.moderator_password)
<the encrypted password>
>>> commit()
(there may or may not be a folded line above - be careful)
It is also possible to do this using the REST API. See https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/l...
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan