On 11/10/20 7:28 AM, Odhiambo Washington wrote:
> On Tue, 10 Nov 2020 at 10:28, Sebastian Hagedorn <haged...@uni-koeln.de>
> wrote:
> 
>>
>>
>> Am 10.11.20 um 08:00 schrieb Odhiambo Washington:
>>> Hello good people,
>>>
>>> Which of the many HOWTOs online is the recommended one for integrating
>>> Captcha with mailman-2.1.34?
>>
>> We use the new text cased Captcha feature:
>>
>> # Use a custom question-answer CAPTCHA to protect against subscription
>> spam.
>> # Has no effect unless SUBSCRIBE_FORM_SECRET is set.
>> # Should be set to a dict mapping language keys to a list of pairs
>> # of questions and regexes for the answers, e.g.
>> # CAPTCHAS = {
>> #   'en': [
>> #     ('What is two times six?', '(12|twelve)'),
>> #     ('What is this mailing list software called?', '[Mm]ailman'),
>> #   ],
>> #   'de': [
>> #     ('Was ist 3 mal 6?', '(18|achtzehn)'),
>> #   ],
>> # }
>> # The regular expression must match the full string, i.e., it is implicitly
>> # acting as if it had "^" in the beginning and "$" at the end.
>> # An 'en' key must be present and is used as fall-back if there are no
>> # questions for the currently set language.
>>
>>
>> Just uncomment that and add your question/answer pairs.
>>
> Hi,
> 
> Where should I add this to?


Actually, the above text is in Mailman/Defaults.py which you should
never change.

Instead, add something like

CAPTCHAS = {
  'en': [
    ('What is two times six?', '(12|twelve)'),
    ('What is this mailing list software called?', '[Mm]ailman'),
  ],
  'de': [
    ('Was ist 3 mal 6?', '(18|achtzehn)'),
  ],
}

to Mailman/mm_cfg.py. Of course use your own settings for the
language(s) and question, answer pairs.

You can also enable Google's reCAPTCHA by going to
<https://www.google.com/recaptcha/admin> and generating a site
key/secret key pair and setting

RECAPTCHA_SITE_KEY = 'the site key'
RECAPTCHA_SECRET_KEY = 'the secret key'

in mm_cfg.py. You can use either the text based CAPTCHA feature or
Googles reCAPTCHA or both.

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
    https://mail.python.org/archives/list/mailman-users@python.org/

Reply via email to