I know that the captcha guide isn't an official Mailman3 product, but I'm trying to follow the instructions on
https://eu.kictanet.or.ke/~wash/mailman3-captcha-guide.html
and I've gotten to the part where it says to run:
python -c " import django, os os.environ.setdefault('DJANGO_SETTINGS_MODULE','mailman_web.settings') django.setup() from django.conf import settings print('django_recaptcha in INSTALLED_APPS:', 'django_recaptcha' in settings.INSTALLED_APPS) print('CAPTCHA_SERVICE:', settings.CAPTCHA_SERVICE) "
And I'm getting the result django_recaptcha in INSTALLED_APPS: False Traceback (most recent call last): File "<string>", line 7, in <module> print('CAPTCHA_SERVICE:', *settings.CAPTCHA_SERVICE*) *^^^^^^^^^^^^^^^^^^^^^^^^* File "/opt/mailman/venv/lib/python3.13/site-packages/django/conf/__init__.py", line 104, in __getattr__ val = getattr(_wrapped, name) *AttributeError*: 'Settings' object has no attribute 'CAPTCHA_SERVICE'
However, in /etc/mailman3/settings.py, I have ### CAPTCHA support CAPTCHA_SERVICE = 'recaptchaV3' RECAPTCHA_PUBLIC_KEY_V3 = '<never mind>' RECAPTCHA_PRIVATE_KEY_V3 = '<never mind>' INSTALLED_APPS += ['django_recaptcha']
# django_recaptcha's own startup system check only reads the unsuffixed # setting names below — without this alias it silently falls back to # Google's public test keys and fails checks.recaptcha_test_key_error on # every Django system check run (including mailman-web's cron jobs). RECAPTCHA_PUBLIC_KEY = RECAPTCHA_PUBLIC_KEY_V3 RECAPTCHA_PRIVATE_KEY = RECAPTCHA_PRIVATE_KEY_V3
I do see the Captcha logo on the login pages.
-- Paul Tomblin