summaryrefslogtreecommitdiff
path: root/puppet/modules/clamav/manifests/milter.pp
diff options
context:
space:
mode:
authorMicah <micah@leap.se>2015-09-22 15:04:33 -0400
committerMicah <micah@leap.se>2015-10-13 10:01:39 -0400
commitd6b521372243b79105a1513d4559572dfab6db54 (patch)
treec54d7433278c2a5b89ea5e2b47e5332efa79d912 /puppet/modules/clamav/manifests/milter.pp
parentb748aeffbdd72d50a7665b9c21c96a9750a840c0 (diff)
add clamav filtering, with sanesecurity signature updating and provider whitelisting (#3625)
Change-Id: I15985ca00ee95bc62855f098a78e364ebbc32616
Diffstat (limited to 'puppet/modules/clamav/manifests/milter.pp')
-rw-r--r--puppet/modules/clamav/manifests/milter.pp48
1 files changed, 48 insertions, 0 deletions
diff --git a/puppet/modules/clamav/manifests/milter.pp b/puppet/modules/clamav/manifests/milter.pp
new file mode 100644
index 00000000..52ddaef1
--- /dev/null
+++ b/puppet/modules/clamav/manifests/milter.pp
@@ -0,0 +1,48 @@
+class clamav::milter {
+
+ $clamav = hiera('clamav')
+ $whitelisted_addresses = $clamav['whitelisted_addresses']
+ $domain_hash = hiera('domain')
+ $domain = $domain_hash['full_suffix']
+
+ package { 'clamav-milter': ensure => installed }
+
+ service {
+ 'clamav-milter':
+ ensure => running,
+ enable => true,
+ name => clamav-milter,
+ pattern => '/usr/sbin/clamav-milter',
+ hasrestart => true,
+ subscribe => File['/etc/default/clamav-milter'];
+ }
+
+ file {
+ '/run/clamav/milter.ctl':
+ mode => '0666',
+ owner => clamav,
+ group => postfix,
+ require => Class['clamav::daemon'];
+
+ '/etc/clamav/clamav-milter.conf':
+ content => template('clamav/clamav-milter.conf.erb'),
+ mode => '0644',
+ owner => root,
+ group => root,
+ subscribe => Service['clamav-milter'];
+
+ '/etc/default/clamav-milter':
+ source => 'puppet:///modules/clamav/clamav-milter_default',
+ mode => '0644',
+ owner => root,
+ group => root;
+
+ '/etc/clamav/whitelisted_addresses':
+ content => template('clamav/whitelisted_addresses.erb'),
+ mode => '0644',
+ owner => root,
+ group => root;
+
+ }
+
+}