Mailman-2.1.34 with Captcha

Hello good people,
Which of the many HOWTOs online is the recommended one for integrating Captcha with mailman-2.1.34?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)

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.
.:.Sebastian Hagedorn - Weyertal 121 (Gebäude 133), Zimmer 2.02.:.
.:.Regionales Rechenzentrum (RRZK).:.
.:.Universität zu Köln / Cologne University - ✆ +49-221-470-89578.:.

On Tue, 10 Nov 2020 at 10:28, Sebastian Hagedorn <Hagedorn@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.
.:.Sebastian Hagedorn - Weyertal 121 (Gebäude 133), Zimmer 2.02.:. .:.Regionales Rechenzentrum (RRZK).:.
.:.Universität zu Köln / Cologne University - ✆ +49-221-470-89578.:.
Hi,
Where should I add this to?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)

On 11/10/20 7:28 AM, Odhiambo Washington wrote:
On Tue, 10 Nov 2020 at 10:28, Sebastian Hagedorn <Hagedorn@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 <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Tue, 10 Nov 2020 at 21:01, Mark Sapiro <mark@msapiro.net> wrote:
On 11/10/20 7:28 AM, Odhiambo Washington wrote:
On Tue, 10 Nov 2020 at 10:28, Sebastian Hagedorn <Hagedorn@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.
I am getting "ERROR for site owner: Invalid key type" with Google reCAPTCHA. when using v3 key type.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)

On 11/11/20 1:59 AM, Odhiambo Washington wrote:
I am getting "ERROR for site owner: Invalid key type" with Google reCAPTCHA. when using v3 key type.
You need V2 checkbox keys for this feature.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On Wed, 11 Nov 2020 at 19:28, Mark Sapiro <mark@msapiro.net> wrote:
On 11/11/20 1:59 AM, Odhiambo Washington wrote:
I am getting "ERROR for site owner: Invalid key type" with Google reCAPTCHA. when using v3 key type.
You need V2 checkbox keys for this feature.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thank you very much for the clarification.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
participants (3)
-
Mark Sapiro
-
Odhiambo Washington
-
Sebastian Hagedorn