clearing pending db

I have an admittedly out-of-date installation of Mailman 3.3 (3.3.2 Tom Sawyer) but it's been working without issues for a long time, so I haven't had much incentive to bring it up to date. Sorry!
A couple of my larger mailing lists (around 500 members) are currently very slow when making changes through the UI (maybe that's my raison-to-update).
They also both have very large lists of members "pending confirmation."
My suspicion is that the large pending list is slowing down other operations.
But pendingdb.evict() doesn't seem to clear the list. For example, on one of my lists:
from mailman.interfaces.pending import IPendings
from zope.component import getUtility
pendingdb = getUtility(IPendings) pendingdb.count() 5040 pendingdb.evict() pendingdb.count() 5040
I have several lists, but none of them are extremely active, so I don't have a problem with wiping the pending db for all of them.
And I also might be totally wrong in my guess.
Mojo
Morris Jones, Monrovia, CA

I encountered the same issue beginning of the year. After deleting all pending requests, mostly from non-real subscribers, the UI worked fine again.
The mailthread in the archives: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/O QX2OJJQF3UBME5ASRZVQS7IWTLUWHMI/#NH4EERK2HSXZGU4QJBMPPMY5NHVK73BE
Best regards, Eric
-----Original Message----- From: Morris Jones <mojo@whiteoaks.com> Sent: Friday, 8 August 2025 19:00 To: mailman-users@mailman3.org Subject: [MM3-users] clearing pending db
I have an admittedly out-of-date installation of Mailman 3.3 (3.3.2 Tom Sawyer) but it's been working without issues for a long time, so I haven't had much incentive to bring it up to date. Sorry!
A couple of my larger mailing lists (around 500 members) are currently very slow when making changes through the UI (maybe that's my raison-to-update).
They also both have very large lists of members "pending confirmation."
My suspicion is that the large pending list is slowing down other operations.
But pendingdb.evict() doesn't seem to clear the list. For example, on one of my lists:
from mailman.interfaces.pending import IPendings >>> >>> from zope.component import getUtility >>> >>> pendingdb = getUtility(IPendings) pendingdb.count() 5040 pendingdb.evict() pendingdb.count() 5040
I have several lists, but none of them are extremely active, so I don't have a problem with wiping the pending db for all of them.
And I also might be totally wrong in my guess.
Mojo
Morris Jones, Monrovia, CA
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/ PNZ7WNKBKBW46C6PNSDUTIZGOJKTOTZU/
This message sent to eric.broens@skynet.be

On 8/8/25 09:59, Morris Jones wrote:
But pendingdb.evict() doesn't seem to clear the list. For example, on one of my lists:
from mailman.interfaces.pending import IPendings
from zope.component import getUtility
pendingdb = getUtility(IPendings) pendingdb.count() 5040 pendingdb.evict() pendingdb.count() 5040
pendingdb.evict() only deletes expired pendings, but by default subscriptions pending confirmation expire after 3 days, but this is set by pending_request_life in the [mailman] section of mailman.cfg. Have you set that to a long time?
On the other hand in Mailman 3.3.2, subscriptions pending approval were pended with a 10 year lifetime. This was changed in 3.3.5 to a new moderator_request_life setting (default 180 days).
If you just want to delete all pendings you could do
pendingdb = getUtility(IPendings)
for pending in pendingdb:
pendingdb.confirm(pending[0], expunge=True)
# and if doing this in mailman shell
commit()
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 8/8/25 11:48 AM, Mark Sapiro wrote:
On 8/8/25 09:59, Morris Jones wrote:
But pendingdb.evict() doesn't seem to clear the list. For example, on one of my lists:
>>> from mailman.interfaces.pending import IPendings >>> >>> from zope.component import getUtility >>> >>> pendingdb = getUtility(IPendings) >>> pendingdb.count() 5040 >>> pendingdb.evict() >>> pendingdb.count() 5040 >>>
pendingdb.evict() only deletes expired pendings, but by default subscriptions pending confirmation expire after 3 days, but this is set by pending_request_life in the [mailman] section of mailman.cfg. Have you set that to a long time?
On the other hand in Mailman 3.3.2, subscriptions pending approval were pended with a 10 year lifetime. This was changed in 3.3.5 to a new moderator_request_life setting (default 180 days).
If you just want to delete all pendings you could do
pendingdb = getUtility(IPendings) for pending in pendingdb: pendingdb.confirm(pending[0], expunge=True) # and if doing this in mailman shell commit()
Perfect, thank you Mark. :)
Mojo
Morris Jones, Monrovia, CA
participants (3)
-
Eric Broens
-
Mark Sapiro
-
Morris Jones