From 33bfafbdbefe55eedcafd3ca27ba0d76d29f0d20 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Mon, 29 Jul 2013 00:13:56 +0300 Subject: [PATCH] spamassassin: Deploy config file --- spamassassin/files/local.cf | 10 ++++++++++ spamassassin/manifests/init.pp | 17 +++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 spamassassin/files/local.cf diff --git a/spamassassin/files/local.cf b/spamassassin/files/local.cf new file mode 100644 index 0000000..4f82886 --- /dev/null +++ b/spamassassin/files/local.cf @@ -0,0 +1,10 @@ +# These values can be overridden by editing ~/.spamassassin/user_prefs.cf +# (see spamassassin(1) for details) + +# These should be safe assumptions and allow for simple visual sifting +# without risking lost emails. + +required_hits 5 +report_safe 0 +rewrite_header Subject [SPAM] + diff --git a/spamassassin/manifests/init.pp b/spamassassin/manifests/init.pp index 0602600..58bc050 100644 --- a/spamassassin/manifests/init.pp +++ b/spamassassin/manifests/init.pp @@ -11,6 +11,23 @@ class spamassassin::common { ensure => present, } + file { "/etc/mail/spamassassin/local.cf": + ensure => present, + mode => "0644", + owner => "root", + group => $::operatingsystem ? { + "openbsd" => "wheel", + default => "root", + }, + source => [ + "puppet:///files/mail/spamassassin.cf.${::homename}", + "puppet:///files/mail/spamassassin.cf", + "puppet:///modules/spamassassin/local.cf", + ], + notify => Service["spamassassin"], + require => Package["spamassassin"], + } + service { "spamassassin": ensure => running, enable => true,