From 91f2bd73e55a889d57d0bd798cd534daf094cbde Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Wed, 6 Apr 2016 19:30:16 +0200 Subject: [PATCH] Add Sought ruleset to spamassassin. --- roles/mail/tasks/main.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index 914ccf5..e4d053e 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -126,7 +126,19 @@ become: yes become_user: amavis -- name: Enable spamassassin cron-job +- name: Download GPG key for Sought ruleset + get_url: url=http://yerp.org/rules/GPG.KEY dest=/etc/spamassassin/sought_ruleset.key + +- name: Import GPG key for Sought ruleset + become_user: debian-spamd + register: gpg_import + command: sa-update --import /etc/spamassassin/sought_ruleset.key + changed_when: 'gpg_import.stderr.find("imported") != -1' + +- name: Enable sa-update cron-job + cron: name=sa-update minute="0" hour="*/6" job="/usr/bin/sa-update -v --gpgkey 6C6191E3 --channel sought.rules.yerp.org --channel updates.spamassassin.org" + +- name: Enable spamd cron-job copy: src=spamassassin dest=/etc/default/spamassassin - name: Start amavis