On Mon, Dec 23, 2024 at 1:37 AM Mark Sapiro <mark@msapiro.net> wrote:
On 12/22/24 05:25, Odhiambo Washington via Mailman-users wrote:
Perhaps you can make a feature request in gitlab? And while at it, please add: mailman nonmembers LISTSPEC With the later, it would be easier to delete non-members from the CLI as well.
Isn't this just
mailman members --role nonmember LISTSPEC
?
I didn't know that the option was right in front of me, but it seems there is a problem: GNU Mailman 3.3.10 (Tom Sawyer), Mailman Core API Version 3.1
(venv) mailman@eu:~$ mailman members --role nonmember
kictanet@lists.kictanet.or.ke
Traceback (most recent call last):
File "/opt/mailman/mm/venv/bin/mailman", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/mailman/mm/venv/lib/python3.11/site-packages/click/core.py",
line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/mm/venv/lib/python3.11/site-packages/click/core.py",
line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File
"/opt/mailman/mm/venv/lib/python3.11/site-packages/mailman/bin/mailman.py",
line 69, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/mm/venv/lib/python3.11/site-packages/click/core.py",
line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/mm/venv/lib/python3.11/site-packages/click/core.py",
line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/mm/venv/lib/python3.11/site-packages/click/core.py",
line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/mm/venv/lib/python3.11/site-packages/click/decorators.py",
line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/opt/mailman/mm/venv/lib/python3.11/site-packages/mailman/commands/cli_members.py",
line 223, in members
display_members(ctx, mlist, role, regular,
File
"/opt/mailman/mm/venv/lib/python3.11/site-packages/mailman/commands/cli_members.py",
line 106, in display_members
dn = address.display_name or member.user.display_name
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'display_name'
(venv) mailman@eu:~$
From Postorius, there are 806 nonmembers.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]