Dears,
I am currently cleaning up a huge list of non-members. In contrast to the members list where I can select multiple entries and delete them at once, this is not possible in the list of non-members?
Can this be enabled in a future release?
Thank you and kind regards Torge
On Sun, Dec 22, 2024 at 3:18 PM Torge Riedel via Mailman-users < mailman-users@mailman3.org> wrote:
Dears,
I am currently cleaning up a huge list of non-members. In contrast to the members list where I can select multiple entries and delete them at once, this is not possible in the list of non-members?
Can this be enabled in a future release?
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.
-- 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]
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
?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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]
On 12/23/24 02:16, Odhiambo Washington via Mailman-users wrote:
On Mon, Dec 23, 2024 at 1:37 AM Mark Sapiro <mark@msapiro.net> wrote:
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 ... ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'display_name'
I saw that too. Reported https://gitlab.com/mailman/mailman/-/issues/1187 and fixed https://gitlab.com/mailman/mailman/-/merge_requests/1297
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Mon, Dec 23, 2024 at 8:58 PM Mark Sapiro <mark@msapiro.net> wrote:
On Mon, Dec 23, 2024 at 1:37 AM Mark Sapiro <mark@msapiro.net> wrote:
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
On 12/23/24 02:16, Odhiambo Washington via Mailman-users wrote: there
is a problem: GNU Mailman 3.3.10 (Tom Sawyer), Mailman Core API Version 3.1 ... ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'display_name'
I saw that too. Reported https://gitlab.com/mailman/mailman/-/issues/1187 and fixed https://gitlab.com/mailman/mailman/-/merge_requests/1297
It isn't clear to me what I should do to mitigate the error.
-- 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]
On 12/24/24 08:13, Odhiambo Washington via Mailman-users wrote:
On Mon, Dec 23, 2024 at 8:58 PM Mark Sapiro <mark@msapiro.net> wrote:
I saw that too. Reported https://gitlab.com/mailman/mailman/-/issues/1187 and fixed https://gitlab.com/mailman/mailman/-/merge_requests/1297
It isn't clear to me what I should do to mitigate the error.
Apply this patch: ``` --- a/src/mailman/commands/cli_members.py +++ b/src/mailman/commands/cli_members.py @@ -103,7 +103,12 @@ def display_members(ctx, mlist, role, regular, digest, if nomail is not None: if member.delivery_status not in status_types: continue - dn = address.display_name or member.user.display_name + # Non-members may have empty address.display_name and member.user can + # be None resulting in AttributeError on member.user.display_name. + try: + dn = address.display_name or member.user.display_name + except AttributeError: + dn = '' if email_only or not dn: print(address.original_email, file=outfp) else: ``` -- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Tue, Dec 24, 2024 at 8:39 PM Mark Sapiro <mark@msapiro.net> wrote:
On 12/24/24 08:13, Odhiambo Washington via Mailman-users wrote:
On Mon, Dec 23, 2024 at 8:58 PM Mark Sapiro <mark@msapiro.net> wrote:
I saw that too. Reported https://gitlab.com/mailman/mailman/-/issues/1187 and fixed https://gitlab.com/mailman/mailman/-/merge_requests/1297
It isn't clear to me what I should do to mitigate the error.
Apply this patch: ``` --- a/src/mailman/commands/cli_members.py +++ b/src/mailman/commands/cli_members.py @@ -103,7 +103,12 @@ def display_members(ctx, mlist, role, regular, digest, if nomail is not None: if member.delivery_status not in status_types: continue - dn = address.display_name or member.user.display_name + # Non-members may have empty address.display_name and member.user can + # be None resulting in AttributeError on member.user.display_name. + try: + dn = address.display_name or member.user.display_name + except AttributeError: + dn = '' if email_only or not dn: print(address.original_email, file=outfp) else: ```
Thank you. Now only if you can help me reconcile the fact that Postorius tells me that I have ``` List Nonmembers (872) ``` ..while the CLI command gives me only 13 addresses. -- 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]
On 12/24/24 23:35, Odhiambo Washington via Mailman-users wrote:
Now only if you can help me reconcile the fact that Postorius tells me that I have
List Nonmembers (872)
..while the CLI command gives me only 13 addresses.
How are you invoking the mailman nonmembers
command? I suspect it is
not using the proper mailman.cfg. Does mailman info
show the correct
mailman.cfg.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, Dec 25, 2024 at 8:05 PM Mark Sapiro <mark@msapiro.net> wrote:
On 12/24/24 23:35, Odhiambo Washington via Mailman-users wrote:
Now only if you can help me reconcile the fact that Postorius tells me
that
I have
List Nonmembers (872)
..while the CLI command gives me only 13 addresses.
How are you invoking the
mailman nonmembers
command? I suspect it is not using the proper mailman.cfg. Doesmailman info
show the correct mailman.cfg.
(venv) mailman@eu:~$ whoami
mailman
(venv) mailman@eu:~$ mailman info
GNU Mailman 3.3.10 (Tom Sawyer)
Python 3.11.2 (main, Sep 14 2024, 03:00:30) [GCC 12.2.0]
config file: /etc/mailman3/mailman.cfg
db url: mysql+pymysql://mailman:XXXXXXXXX@localhost
/mailmansuite?charset=utf8mb4&use_unicode=1
devmode: DISABLED
REST root url: https://localhost:8001/3.1/
REST credentials: restadmin:restpass
(venv) mailman@eu:~$ mailman members --role nonmember LISTSPEC
Agnes <agnesa@REDACTED.com>
Angela M <angelam@REDACTED.org>
<beatiemaina!!@REDACTED.com>
<psgimode@REDACTED.ke>
<jwothaxxx@\REDACTED.ke>
<lgichdhdh@REDACTED.ke>
<mrussher@REDACTED.org>
<mutwiXXj3@REDACTED.com>
<news@REDACTED>
Nesema <xxxxxx@kictanet.or.ke>
Robert M <xxxxxxo@yahoo.com>
<telasalma17@ REDACTED >
<wambdddddd@REDACTED.ke>
(venv) mailman@eu:~$ mailman members --role nonmember LISTSPEC | wc -l
13
(venv) mailman@eu:~$
It uses the correct config file.
-- 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]
On December 25, 2024 2:01:27 PM PST, Odhiambo Washington via Mailman-users <mailman-users@mailman3.org> wrote:
members --role nonmember LISTSPEC | wc -l 13
What do you get if you do
mailman shell -l LISTSPEC
...
>>> len(list(m.nonmembers.members))
-- Mark Sapiro <mark@msapiro.net> Sent from my Not_an_iThing with standards compliant, open source software.
On Thu, Dec 26, 2024 at 1:27 AM Mark Sapiro <mark@msapiro.net> wrote:
On December 25, 2024 2:01:27 PM PST, Odhiambo Washington via Mailman-users <mailman-users@mailman3.org> wrote:
members --role nonmember LISTSPEC | wc -l 13
What do you get if you do
mailman shell -l LISTSPEC ... >>> len(list(m.nonmembers.members))
(venv) mailman@eu:~$ mailman shell -l LISTSPEC 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 LISTSPEC mailing list In [1]: len(list(m.nonmembers.members)) Out[1]: 873
In [2]:
-- 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]
On 12/25/24 15:02, Odhiambo Washington via Mailman-users wrote:
(venv) mailman@eu:~$ mailman shell -l LISTSPEC 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 LISTSPEC mailing list In [1]: len(list(m.nonmembers.members)) Out[1]: 873
Then it appears that your version of mailman/commands/cli_members is broken. Compare it to https://gitlab.com/mailman/mailman/-/raw/master/src/mailman/commands/cli_mem...
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Thu, Dec 26, 2024 at 7:24 AM Mark Sapiro <mark@msapiro.net> wrote:
On 12/25/24 15:02, Odhiambo Washington via Mailman-users wrote:
(venv) mailman@eu:~$ mailman shell -l LISTSPEC 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 LISTSPEC mailing list In [1]: len(list(m.nonmembers.members)) Out[1]: 873
Then it appears that your version of mailman/commands/cli_members is broken. Compare it to
https://gitlab.com/mailman/mailman/-/raw/master/src/mailman/commands/cli_mem...
That's right. This one does what is expected.
-- 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]
Feature request created: https://gitlab.com/mailman/postorius/-/issues/617
Am 22.12.24 um 14:25 schrieb Odhiambo Washington:
On Sun, Dec 22, 2024 at 3:18 PM Torge Riedel via Mailman-users <mailman-users@mailman3.org> wrote:
Dears, I am currently cleaning up a huge list of non-members. In contrast to the members list where I can select multiple entries and delete them at once, this is not possible in the list of non-members? Can this be enabled in a future release?
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.
-- 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]
participants (3)
-
Mark Sapiro
-
Odhiambo Washington
-
Torge Riedel