patch mailman to add a simple question-and-answer CAPTCHA
[ansible.git] / roles / email / templates / mm_cfg.py
index a3b02f948504816cd27dbc590987fb5f9d80ff17..89dd0d87bbf784bccde4edbc9343ccd75a3ce8ac 100644 (file)
@@ -1,4 +1,5 @@
 # -*- python -*-
+# -*- coding: utf-8 -*-
 
 # Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc.
 #
@@ -128,3 +129,15 @@ DEFAULT_DIGEST_FOOTER = DEFAULT_MSG_FOOTER
 # DMARC, DKIM-compatibility
 REMOVE_DKIM_HEADERS = 1 # remove DKIM headers for lists where From: is changed
 DEFAULT_DMARC_MODERATION_ACTION = 1 # Munge From
+
+# Spammer protection
+SUBSCRIBE_FORM_SECRET = "{{postfix.mailman.form_secret}}"
+CAPTCHAS = [
+{% for item in postfix.mailman.captcha %}
+    ('{{item.question}}', [
+    {% for answer in item.answers %}
+        '{{answer}}',
+    {% endfor %}
+    ]),
+{% endfor %}
+]