On 1/1/21 4:41 PM, Andrew Hodgson wrote:
I don't want to add captchas to the form right now but is there any way to clean out these users from the database perhaps periodically based on whether the accounts are subscribed to any list?
I have attached a script that will delete users from Django's user database (the auth_user table) if there is no Mailman user with the Django user's email address or if there is a Mailman user but it's not a member, nonmember, owner or moderator of any lists.
The setting DELETE_MAILMAN_USER controls whether it will also delete the corresponding Mailman user that's not a member, nonmember, owner or moderator of any lists. If set to True, it will.
The script has a few installation specific paths that may need adjustment. Also, if Mailman is installed in a virtualenv, the script needs to be run by the python in that virtualenv so that the imports all work (as with the shebang in the script).
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan