summaryrefslogtreecommitdiffstats
path: root/roles/IMAP
diff options
context:
space:
mode:
Diffstat (limited to 'roles/IMAP')
-rw-r--r--roles/IMAP/files/etc/spamassassin/v320.pre64
-rw-r--r--roles/IMAP/handlers/main.yml6
-rw-r--r--roles/IMAP/tasks/spam.yml6
3 files changed, 76 insertions, 0 deletions
diff --git a/roles/IMAP/files/etc/spamassassin/v320.pre b/roles/IMAP/files/etc/spamassassin/v320.pre
new file mode 100644
index 0000000..a5c1b3e
--- /dev/null
+++ b/roles/IMAP/files/etc/spamassassin/v320.pre
@@ -0,0 +1,64 @@
+# This is the right place to customize your installation of SpamAssassin.
+#
+# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
+# tweaked.
+#
+# This file was installed during the installation of SpamAssassin 3.2.0,
+# and contains plugin loading commands for the new plugins added in that
+# release. It will not be overwritten during future SpamAssassin installs,
+# so you can modify it to enable some disabled-by-default plugins below,
+# if you so wish.
+#
+# There are now multiple files read to enable plugins in the
+# /etc/mail/spamassassin directory; previously only one, "init.pre" was
+# read. Now both "init.pre", "v310.pre", and any other files ending in
+# ".pre" will be read. As future releases are made, new plugins will be
+# added to new files, named according to the release they're added in.
+###########################################################################
+
+# Check - Provides main check functionality
+#
+loadplugin Mail::SpamAssassin::Plugin::Check
+
+# HTTPSMismatch - find URI mismatches between href and anchor text
+#
+loadplugin Mail::SpamAssassin::Plugin::HTTPSMismatch
+
+# URIDetail - test URIs using detailed URI information
+#
+loadplugin Mail::SpamAssassin::Plugin::URIDetail
+
+# Shortcircuit - stop evaluation early if high-accuracy rules fire
+#
+# loadplugin Mail::SpamAssassin::Plugin::Shortcircuit
+
+# Plugins which used to be EvalTests.pm
+# broken out into separate plugins
+loadplugin Mail::SpamAssassin::Plugin::Bayes
+loadplugin Mail::SpamAssassin::Plugin::BodyEval
+loadplugin Mail::SpamAssassin::Plugin::DNSEval
+loadplugin Mail::SpamAssassin::Plugin::HTMLEval
+loadplugin Mail::SpamAssassin::Plugin::HeaderEval
+loadplugin Mail::SpamAssassin::Plugin::MIMEEval
+loadplugin Mail::SpamAssassin::Plugin::RelayEval
+loadplugin Mail::SpamAssassin::Plugin::URIEval
+loadplugin Mail::SpamAssassin::Plugin::WLBLEval
+
+# VBounce - anti-bounce-message rules, see rules/20_vbounce.cf
+#
+loadplugin Mail::SpamAssassin::Plugin::VBounce
+
+# Rule2XSBody - speedup by compilation of ruleset to native code
+#
+loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody
+
+# ASN - Look up the Autonomous System Number of the connecting IP
+# and create a header containing ASN data for bayes tokenization.
+# See plugin's POD docs for usage info.
+#
+# loadplugin Mail::SpamAssassin::Plugin::ASN
+
+# ImageInfo - rules to match metadata of image attachments
+#
+loadplugin Mail::SpamAssassin::Plugin::ImageInfo
+
diff --git a/roles/IMAP/handlers/main.yml b/roles/IMAP/handlers/main.yml
index 9bd7dab..bda2ab9 100644
--- a/roles/IMAP/handlers/main.yml
+++ b/roles/IMAP/handlers/main.yml
@@ -11,6 +11,12 @@
- name: Restart ClamAV
service: name=clamav-daemon state=restarted
+- name: Compile Spamassassin rules
+ sudo_user: debian-spamd
+ # it might take a while...
+ command: /usr/bin/sa-compile --quiet
+ chdir=/var/lib/spamassassin/
+
- name: Restart Amavis
service: name=amavis state=restarted
diff --git a/roles/IMAP/tasks/spam.yml b/roles/IMAP/tasks/spam.yml
index e3baca0..51fde4b 100644
--- a/roles/IMAP/tasks/spam.yml
+++ b/roles/IMAP/tasks/spam.yml
@@ -5,7 +5,12 @@
- spamassassin
- spamc
- libdbi-perl
+ - re2c
+ - libc6-dev
+ - gcc
+ - make
notify:
+ - Compile Spamassassin rules
- Restart Amavis
- name: Create a 'spamassassin' database
@@ -25,6 +30,7 @@
with_items:
- spamassassin/local.cf
- spamassassin/v310.pre
+ - spamassassin/v320.pre
notify:
- Restart Amavis