From 2d4c7908233109e081de0e932ac3c7d8cf0ba4e5 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Mon, 25 May 2009 11:58:46 +0100 Subject: [PATCH] Add minimal clamav and postgrey classes to the exim::mx class Signed-off-by: Stephen Gran --- modules/clamav/manifests/init.pp | 24 ------------------------ modules/exim/manifests/mx.pp | 3 +++ modules/postgrey/files/default | 16 ++++++++++++++++ modules/postgrey/manifests/init.pp | 2 +- 4 files changed, 20 insertions(+), 25 deletions(-) create mode 100644 modules/postgrey/files/default diff --git a/modules/clamav/manifests/init.pp b/modules/clamav/manifests/init.pp index f32805d98..0be36abb9 100644 --- a/modules/clamav/manifests/init.pp +++ b/modules/clamav/manifests/init.pp @@ -2,29 +2,5 @@ class clamav { package { "clamav-daemon": ensure => installed; "clamav-freshclam": ensure => installed; } - - file { - "/etc/clamav/clamd.conf": - source => "puppet:///clamav/clamd.conf", - require => Package["clamav-daemon"], - notify => Exec["clamav-daemon restart"] - ; - } - - file { - "/etc/clamav/freshclam.conf": - source => "puppet:///clamav/freshclam.conf", - require => Package["clamav-freshclam"], - notify => Exec["clamav-freshclam restart"] - ; - } - exec { "clamav-daemon restart": - path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", - refreshonly => true, - } - exec { "clamav-freshclam restart": - path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", - refreshonly => true, - } } diff --git a/modules/exim/manifests/mx.pp b/modules/exim/manifests/mx.pp index 1e77aa925..2f1bfb64e 100644 --- a/modules/exim/manifests/mx.pp +++ b/modules/exim/manifests/mx.pp @@ -1,4 +1,7 @@ class exim::mx inherits exim { + include clamav + include postgrey + file { "/etc/exim4/ccTLD.txt": require => Package["exim4-daemon-heavy"], diff --git a/modules/postgrey/files/default b/modules/postgrey/files/default new file mode 100644 index 000000000..224e76410 --- /dev/null +++ b/modules/postgrey/files/default @@ -0,0 +1,16 @@ +# postgrey startup options, created for Debian +# (c)2004 Adrian von Bidder +# Distribute and/or modify at will. + +# you may want to set +# --delay=N how long to greylist, seconds (default: 300) +# --max-age=N delete old entries after N days (default: 30) +# see also the postgrey(8) manpage + +#POSTGREY_OPTS="--inet=127.0.0.1:60000" + +# the --greylist-text commandline argument can not be easily passed through +# POSTGREY_OPTS when it contains spaces. So, insert your text here: +#POSTGREY_TEXT="Your customized rejection message here" +POSTGREY_OPTS="--unix=/var/run/postgrey/socket --retry-window=4 --auto-whitelist-clients=10 --exim" +[ -d /var/run/postgrey ] || (mkdir /var/run/postgrey && chown postgrey:Debian-exim /var/run/postgrey && chmod 750 /var/run/postgrey) diff --git a/modules/postgrey/manifests/init.pp b/modules/postgrey/manifests/init.pp index fd735b96c..bc42e865c 100644 --- a/modules/postgrey/manifests/init.pp +++ b/modules/postgrey/manifests/init.pp @@ -3,7 +3,7 @@ class postgrey { file { "/etc/default/postgrey": - source => "puppet:///exim/common/postgrey-default", + source => "puppet:///postgrey/default", require => Package["postgrey"], notify => Exec["postgrey restart"] ; -- 2.20.1