3 Dec
2024
3 Dec
'24
3:26 a.m.
On 12/2/24 6:40 PM, Joachim Schrod wrote:
First: I assume that all information about moderation is in the database mailman3. If that's not the case, please tell me.
It is the case, but it's easier to use mailman shell. Something like
$ mailman shell -l test.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.
The variable 'm' is the test.example.com mailing list
>>> pendingsdb = getUtility(IPendings)
>>> for token, data in pendingsdb.find(m):
... if data.get('token_owner') == 'moderator':
... if data['type'] == 'unsubscription':
... pendingsdb.confirm(token, expunge=True)
...
>>> commit()
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan