clean up spambot generated accounts
Dear all,
I'm trying to find a way to clean up hundreds of spambot generated accounts on my system. I was pointed to this script that should be capable of doing the task:
https://www.msapiro.net/scripts/clean_users.py
However, it seems outdated. First, the path to the interpreter is not what I find on my mailman3 installation. It says:
#! /opt/mailman/mm/venv/bin/python
However, the python command is located in /opt/mailman/venv/bin/python instead, no "mm"
After fixing this, the script still throws an error:
(venv) mailman@ida:~$ clean_users.py Traceback (most recent call last): File "/usr/local/bin/clean_users.py", line 55, in <module> django.setup() File "/opt/mailman/venv/lib/python3.10/site-packages/django/**init**.py", line 19, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/opt/mailman/venv/lib/python3.10/site-packages/django/conf/**init**.py", line 102, in **getattr** self._setup(name) File "/opt/mailman/venv/lib/python3.10/site-packages/django/conf/**init**.py", line 89, in _setup self._wrapped = Settings(settings_module) File "/opt/mailman/venv/lib/python3.10/site-packages/django/conf/**init**.py", line 217, in **init** mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python3.10/importlib/**init**.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'settings'
Can somebody explain to me, why this module is not found and what I can do to fix it, if anything?
Thanks a lot in advance!
Johannes
participants (2)
-
Johannes Rohr -
Stephen J. Turnbull