From: Ralf Jung Date: Sat, 2 Jun 2018 13:49:21 +0000 (+0200) Subject: mailman: set SUBSCRIBE_FORM_SECRET to protect better against spammers X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/937b170594be82e500ae726dc47de8ca9ef3dfcf mailman: set SUBSCRIBE_FORM_SECRET to protect better against spammers --- 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}}"