14 Mar
2022
14 Mar
'22
5:36 p.m.
On 3/14/22 09:18, IEM Network Operation Center (IOhannes m zmölnig) wrote:
this is with "Postorius Version 1.2.4" (as installed by the mailman3 Debian package).
The Debian packages are OK for people who want to install things via a package manager, but they are quite out of date.
Something like the following in mailman shell
can do it.
>>> # Cutoff date delete pended subscriptions older than this
>>> cutoff = '2022-03-01'
>>> pendings = getUtility(IPendings)
>>> # Prior to Mailman core 3.3.5 need to explicitly delete workflow
>>> wfm = getUtility(IWorkflowStateManager)
>>>for token, data in pendings.find(pend_type='subscription'):
... if data['token_owner'] != 'subscriber':
... continue
... if data['when'] >= cutoff:
... continue
... pendings.confirm(token, expunge=True)
... # for MM < 3.3.5
... wfm.discard(token)
...
>>> commit()
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan