Add minimal clamav and postgrey classes to the exim::mx class
authorStephen Gran <steve@lobefin.net>
Mon, 25 May 2009 10:58:46 +0000 (11:58 +0100)
committerStephen Gran <steve@lobefin.net>
Mon, 25 May 2009 10:58:46 +0000 (11:58 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/clamav/manifests/init.pp
modules/exim/manifests/mx.pp
modules/postgrey/files/default [new file with mode: 0644]
modules/postgrey/manifests/init.pp

index f32805d..0be36ab 100644 (file)
@@ -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,
-    }
 }
 
index 1e77aa9..2f1bfb6 100644 (file)
@@ -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 (file)
index 0000000..224e764
--- /dev/null
@@ -0,0 +1,16 @@
+# postgrey startup options, created for Debian
+# (c)2004 Adrian von Bidder <avbidder@fortytwo.ch>
+# 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)
index fd735b9..bc42e86 100644 (file)
@@ -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"]
           ;