Deleting 20,000 pending subscriptions

Thanks to the advice of Mark Sapiro I have managed to stop the deluge of subscriptions to my lists, but I am left with the problem of having over 20,000 pending subscriptions awaiting my administration.
What would be great is if there were a command line program I could run to delete all pending subscription requests, is there such a thing?
Regards, John Elliot V
|_|O|_| ProgClub |_|_|O| Because every programmer needs a good club! |O|O|O| https://www.progclub.org/

On 4/26/21 3:53 AM, John Elliot V | ProgClub wrote:
What would be great is if there were a command line program I could run to delete all pending subscription requests, is there such a thing?
There are several issues with pending requests that are fixed in Mailman core 3.3.5 (not yet released) including a new task runner to periodically delete expired requests and cache entries, but there are still issues with (un)subscription requests waiting user confirmation that were originally pended with too long a lifetime. The attached script fixes those, but it won't help you as is, because your requests are moderator requests. However, if you change the line
if values and values['token_owner'] == 'subscriber':
in the script to
if values:
it should delete any pending subscription requests older than 3 days (or the configured pending_request_life).
You could also replace the config.mailman.pending_request_life argument to as_timedelta() with a shorter time such as '1d' or '12h'
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 4/26/21 10:29 AM, Mark Sapiro wrote:
On 4/26/21 3:53 AM, John Elliot V | ProgClub wrote:
What would be great is if there were a command line program I could run to delete all pending subscription requests, is there such a thing?
There are several issues with pending requests that are fixed in Mailman core 3.3.5 (not yet released) ...
Sorry, that reply was off topic and irrelevant for this issue which is Mailman 2.1, not Mailman 3.
For Mailman 2.1, you can uses the script at https://www.msapiro.net/scripts/list_requests to discard all requests.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

And looking through my script library, I see there is also a withlist script at https://www.msapiro.net/scripts/discard_subs.py which may be easier to use for this purpose.
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 27/4/21 1:59 pm, Mark Sapiro wrote:
And looking through my script library, I see there is also a withlist script at https://www.msapiro.net/scripts/discard_subs.py which may be easier to use for this purpose.
This one did the trick, thanks Mark.
-- |_|O|_| ProgClub |_|_|O| Because every programmer needs a good club! |O|O|O| https://www.progclub.org/

Hello.
I attach a program do delete subscription per list. Someone send it to me some time ago, when I had the same problem.
On 26/4/2021 1:53 μ.μ., John Elliot V | ProgClub wrote:
Thanks to the advice of Mark Sapiro I have managed to stop the deluge of subscriptions to my lists, but I am left with the problem of having over 20,000 pending subscriptions awaiting my administration.
What would be great is if there were a command line program I could run to delete all pending subscription requests, is there such a thing?
Regards, John Elliot V
participants (3)
-
John Elliot V | ProgClub
-
Mark Sapiro
-
nikos