
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