Deleting moderation requests in database
OK; so I have an old mailman instance where I can't confirm unsubscribe moderation requests. mailman3 core is still sending me daily notices about that moderation requests; I want to get rid of them. (By now, I unsubscribed this test subscriber, so these messages are garbage anyhow.)
First: I assume that all information about moderation is in the database mailman3. If that's not the case, please tell me.
Second: I tried to determine what DB records are involved in a moderation, so I can delete them. I found the following records: -- workflowstate: records about pending confirmations; with a token as primary key. -- pended: records that references that key, with an id. -- pendedkeyvalue: records with additional information about the request, referenced by the id of table record `pended'.
In addition, there is a record in table member' for that mailing list, with an UUID in
_member_id' that isn't stored in any other
record in the database elsewhere. (This is a test mailing list that
currently has *no* members; thus this record might be relevant.) Where
is this `_member_id' UUID used?
My question is: Which records do I have to delete to get rid of the daily pending unsubscribe moderation notices?
Cheers, Joachim
--
Joachim Schrod Email: joachim@schrod.org Roedermark, Germany
``How do we persuade new users that spreading fonts across the page
like peanut butter across hot toast is not necessarily the route to
typographic excellence?'' -- Peter Flynn
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
Mark Sapiro writes:
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()
Thanks a lot, worked like a charm!
Joachim
--
Joachim Schrod Email: joachim@schrod.org Roedermark, Germany
``How do we persuade new users that spreading fonts across the page
like peanut butter across hot toast is not necessarily the route to
typographic excellence?'' -- Peter Flynn
participants (2)
-
Joachim Schrod
-
Mark Sapiro