summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/handlers
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2013-12-09 08:11:16 +0100
committerGuilhem Moulin <guilhem@fripost.org>2015-06-07 02:51:17 +0200
commit7c089f71667a1a14cc508772ca289d4d1d2edd27 (patch)
tree2858164a1015603ebb8f2478b920e84a7dd62dd6 /roles/IMAP/handlers
parent185cf14065554038820c696e7d35f47017b43783 (diff)
Configure the content filter.
Antispam & antivirus, using ClamAV and SpamAssassin through Amavisd-new. Each user has his/her amavis preferences, and own Bayes filter (to maximize privacy). One question remains, though: how to set spamassassin's trusted_networks / internal_networks / msa_networks? It seems not obivious to get it write with IPSec and dynamic IPs. (Cf. https://wiki.apache.org/spamassassin/AwlWrongWay)
Diffstat (limited to 'roles/IMAP/handlers')
-rw-r--r--roles/IMAP/handlers/main.yml19
1 files changed, 19 insertions, 0 deletions
diff --git a/roles/IMAP/handlers/main.yml b/roles/IMAP/handlers/main.yml
index 2e54251..9bd7dab 100644
--- a/roles/IMAP/handlers/main.yml
+++ b/roles/IMAP/handlers/main.yml
@@ -7,3 +7,22 @@
- name: Reload Postfix
service: name=postfix state=reloaded
+
+- name: Restart ClamAV
+ service: name=clamav-daemon state=restarted
+
+- name: Restart Amavis
+ service: name=amavis state=restarted
+
+- name: Copy SQL tables for spamassassin
+ copy: src=tmp/spamassassin.sql
+ dest=/tmp/spamassassin.sql
+ owner=root group=root
+ mode=0600
+
+- name: Create SQL tables for spamassassin
+ # see https://svn.apache.org/repos/asf/spamassassin/trunk/sql/
+ # for the original
+ mysql_db: name=spamassassin state=import
+ target=/tmp/spamassassin.sql
+ encoding=latin1 collation=latin1_unicode_ci