Hello,
We have a constant issue with confirmation emails for subscribers getting lost and then the subscriber contacting us because their posts to the list never show up. Is there a way I can, as an administrator, do the confirmation on their behalf or in some other way promote them to being a member from non-member?
Regards, Quanah
On 3/15/22 11:16, Quanah Gibson-Mount wrote:
Hello,
We have a constant issue with confirmation emails for subscribers getting lost and then the subscriber contacting us because their posts to the list never show up. Is there a way I can, as an administrator, do the confirmation on their behalf or in some other way promote them to being a member from non-member?
See this thread https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/M...
If they don't have an outstanding subscription waiting user confirmation, you can just mass subscribe them.
If they do and your Postorius and Mailman core is reasonably up to date, you can find the pending request at Subscription requests -> Pending Confirmation, delete it and then mass subscribe them.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
--On Tuesday, March 15, 2022 10:29 PM -0700 Mark Sapiro <mark@msapiro.net> wrote:
On 3/15/22 11:16, Quanah Gibson-Mount wrote:
Hello,
We have a constant issue with confirmation emails for subscribers getting lost and then the subscriber contacting us because their posts to the list never show up. Is there a way I can, as an administrator, do the confirmation on their behalf or in some other way promote them to being a member from non-member?
See this thread https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/threa d/MJOOH23W6EKZO7GI5HRDKB4S733JEEVG/
If they don't have an outstanding subscription waiting user confirmation, you can just mass subscribe them.
If they do and your Postorius and Mailman core is reasonably up to date, you can find the pending request at Subscription requests -> Pending Confirmation, delete it and then mass subscribe them.
Hi Mark,
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.
Regards, Quanah
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.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
--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
On 3/17/22 10:19, Quanah Gibson-Mount wrote:
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
This says that there is no Address object with the email xxxxxxxx@xxxxx.org
What do you get in mailman shell
for
>>> um = getUtility(IUserManager)
>>> um.get_address('xxxxxxxx@xxxxx.org')
>>> um.get_user('xxxxxxxx@xxxxx.org')
These should return an Address and a User respectively. If they don't, did you perhaps run some process to delete the user?
If the user is gone, you should be able to replace
... sub_mgr.confirm(token)
in the above with
... wfm = getUtility(IWorkflowStateManager)
... pendings.confirm(token, expunge=True)
... wfm.discard(token)
to clear the pending subscription and workflow and then be able to mass subscribe the user.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
--On Thursday, March 17, 2022 12:06 PM -0700 Mark Sapiro <mark@msapiro.net> wrote:
This says that there is no Address object with the email xxxxxxxx@xxxxx.org
What do you get in
mailman shell
for>>> um = getUtility(IUserManager) >>> um.get_address('xxxxxxxx@xxxxx.org') >>> um.get_user('xxxxxxxx@xxxxx.org')
These should return an Address and a User respectively. If they don't, did you perhaps run some process to delete the user?
I've done nothing in regard to this user. Neither command returns anything.
I see it return my user object if I test with my own email address.
If the user is gone, you should be able to replace
... sub_mgr.confirm(token)
in the above with
... wfm = getUtility(IWorkflowStateManager) ... pendings.confirm(token, expunge=True) ... wfm.discard(token)
to clear the pending subscription and workflow and then be able to mass subscribe the user.
I did this, and can confirm that they no longer show up in the list of pending subscriptions via the mailman shell interface for that list.
However, if I go to mass subscribe them via the interface, I get:
HTTP Error 409: b'Subscription request already pending'
Regards, Quanah
On 3/17/22 12:25, Quanah Gibson-Mount wrote:
I've done nothing in regard to this user. Neither command returns anything.
Well, something has deleted the user, but ...
If the user is gone, you should be able to replace
... sub_mgr.confirm(token)
in the above with
... wfm = getUtility(IWorkflowStateManager) ... pendings.confirm(token, expunge=True) ... wfm.discard(token)
to clear the pending subscription and workflow and then be able to mass subscribe the user.
I did this, and can confirm that they no longer show up in the list of pending subscriptions via the mailman shell interface for that list.
However, if I go to mass subscribe them via the interface, I get:
HTTP Error 409: b'Subscription request already pending'
I don't understand. If there is no entry for that address when you do
>>> for token, data in pendings.find(pend_type='subscription'):
... if data['token_owner'] != 'subscriber':
... continue
... if data['email'] != 'user@example.com':
... continue
... print(data['email'])
...
You should not be getting that 'Subscription request already pending' response.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Quanah Gibson-Mount