From 937b170594be82e500ae726dc47de8ca9ef3dfcf Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Jun 2018 15:49:21 +0200 Subject: [PATCH] mailman: set SUBSCRIBE_FORM_SECRET to protect better against spammers --- host_vars/template.yml | 1 + roles/email/templates/mm_cfg.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/host_vars/template.yml b/host_vars/template.yml index ab4b23a..fb971ba 100644 --- a/host_vars/template.yml +++ b/host_vars/template.yml @@ -51,6 +51,7 @@ postfix: domains: # the file /etc/postfix/virtual_alias_map can be used to configure aliases - lists.example.org default_footer: "-- \n%(list_name)s@%(host_name)s - %(description)s\nConfiguration: %(web_page_url)slistinfo%(cgiext)s/%(list_name)s\nUnsubscribe: %(list_name)s-unsubscribe@%(host_name)s\n" + form_secret: $RANDOM # optional: Install and configure dovecot dovecot: domains: # the file /etc/postfix/virtual_alias_map can be used to configure aliases diff --git a/roles/email/templates/mm_cfg.py b/roles/email/templates/mm_cfg.py index a3b02f9..9464272 100644 --- a/roles/email/templates/mm_cfg.py +++ b/roles/email/templates/mm_cfg.py @@ -128,3 +128,6 @@ 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}}" -- 2.30.2