--On Wednesday, March 16, 2022 7:54 PM -0700 Mark Sapiro <mark@msapiro.net> wrote:
On 3/16/22 12:56, Quanah Gibson-Mount wrote:
Thanks for the response. Unfortunately I'm currently stuck with the junk shipped by Debian. Yet another reason to move to a standalone install and avoid their broken packages.
In the mean time, you can handle these issues via REST or via
mailman shell
. For example:$ 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. >>> pendings = getUtility(IPendings) >>> sub_mgr = ISubscriptionManager(m) >>> for token, data in pendings.find(pend_type='subscription'): ... if data['token_owner'] != 'subscriber': ... continue ... if data['email'] != 'user@example.com': ... continue ... sub_mgr.confirm(token) ... >>> commit()
The above will find the pending confirmation for user@example.com on the list list@example.com and confirm it.
Hi Mark,
I gave this a whirl. First I just had it print out all the emails waiting for confirmation just to confirm I saw the user in question had a pending subscription request, which they did (two in fact for the same email).
So then I ran your code to confirm it, and it blows up with an error:
for token, data in pendings.find(pend_type='subscription'): ... if data['token_owner'] != 'subscriber': ... continue ... if data['email'] != 'xxxxxxxx@xxxxx.org': ... continue ... sub_mgr.confirm(token) ... Traceback (most recent call last): File "<console>", line 6, in <module> File "/usr/lib/python3/dist-packages/mailman/app/subscriptions.py", line 545, in confirm workflow.restore() File "/usr/lib/python3/dist-packages/mailman/app/workflow.py", line 149, in restore setattr(self, attr, data[attr]) File "/usr/lib/python3/dist-packages/mailman/app/subscriptions.py", line 119, in address_key assert self.address is not None AssertionError
Regards, Quanah