summaryrefslogtreecommitdiff
path: root/puppet/modules/clamav/manifests/milter.pp
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-10-14 12:45:09 -0700
committerelijah <elijah@riseup.net>2015-10-14 12:45:09 -0700
commit81763f22e0e5515fa2a3b9c8a65050692bb1cf74 (patch)
tree42a86bbb40d4a7b8b84c37bae4f0aa3362a3c475 /puppet/modules/clamav/manifests/milter.pp
parent33b9876af4af85504107aae20feb57aaab5a17ad (diff)
parent43595b105a21aaccb41c4d9199d87b3dc2d48ab5 (diff)
Merge branch 'develop' of ssh://leap.se/leap_platform into develop
Diffstat (limited to 'puppet/modules/clamav/manifests/milter.pp')
-rw-r--r--puppet/modules/clamav/manifests/milter.pp50
1 files changed, 50 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..e8a85e3f
--- /dev/null
+++ b/puppet/modules/clamav/manifests/milter.pp
@@ -0,0 +1,50 @@
+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,
+ require => Package['clamav-milter'],
+ 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,
+ require => Package['clamav-milter'],
+ 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,
+ require => Package['clamav-milter'];
+ }
+
+}