Configure administrative users via command line?
I recently migrated a mailing list from Mailman 2.x to Mailman 3.x. Sending messages to and receiving messages from the list seems to work well. The web interface archives seem to be working well. Xapian is configured as the search engine. With only 60K some messages, archive search seems very fast.
How can I configure administrative users via command line? I need to process a moderation request. I have root access on the server. A pointer to the appropriate documentation would be more than welcome. Thank you to anyone who can provide help.
Ken
On 7/18/23 11:38, kjohnson@eclypse.org wrote:
How can I configure administrative users via command line? I need to process a moderation request. I have root access on the server. A pointer to the appropriate documentation would be more than welcome. Thank you to anyone who can provide help.
I'm not sure what you want. If you are an owner or moderator of a list or a superuser, you can handle moderation requests via Postorius. If you are a list owner or a superuser, you can manage owners and moderators via Postorius.
You can add superusers via the command line django admin
createsuperuser
command.
It might be good if the command line mailman addmembers
and mailman delmembers
commands accepted a role
, but they don't. You can manage
owners and moderators via the REST API which you can access via curl.
See
<https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/membership.html#owners-and-moderators>.
You can also do this via mailman shell
.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thank you for the prompt and informative reply.
Mark Sapiro wrote:
... If you are an owner or moderator of a list or a superuser, you can handle moderation requests via Postorius. If you are a list owner or a superuser, you can manage owners and moderators via Postorius.
Yes, I would like to do that.
You can add superusers via the command line django admin createsuperuser command.
For the reference of others like me, createsuperuser will allow you to create a user with a non-unique email address. I strongly recommend against that.
mailman shell gave me:
from django.contrib.auth.models import User User.objects.filter(is_superuser=True) <QuerySet [<User: admin>, <User: xxxx>]>
I dredged a password for admin out of my memory and was able to perform the moderation request. I also set a new list owner.
On 7/18/23 15:18, kjohnson@eclypse.org wrote:
mailman shell gave me:
>>>> from django.contrib.auth.models import User
>>>> User.objects.filter(is_superuser=True)
> <QuerySet [<User: admin>, <User: xxxx>]>
For Django, it's better to use the django admin shell
as it does
Django's initiaization which may be required depending on what you do.
Also Django has a web admin UI, normally at a URL like https://example.com/admin/
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
kjohnson@eclypse.org
-
Mark Sapiro