]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/exim/manifests/init.pp
restrict smtp
[dsa-puppet.git] / modules / exim / manifests / init.pp
index 2e361b5f2aed979dae1f44f3325c9f5b21eb053d..61ab93cec0548c1bb57f19bb3c6f255b083670d8 100644 (file)
@@ -19,6 +19,20 @@ class exim {
           mode    => 755,
           purge   => true
         ;
+        "/etc/exim4/Git":
+          ensure  => directory,
+          purge   => true,
+          force   => true,
+          recurse => true,
+          source  => "puppet:///files/empty/"
+        ;
+        "/etc/exim4/conf.d":
+          ensure  => directory,
+          purge   => true,
+          force   => true,
+          recurse => true,
+          source  => "puppet:///files/empty/"
+        ;
         "/etc/exim4/ssl":
           ensure  => directory,
           owner   => root,
@@ -130,10 +144,33 @@ class exim {
           group   => Debian-exim,
           mode    => 640
           ;
+        "/var/log/exim4":
+          mode    => 2750,
+          ensure  => directory,
+          owner   => Debian-exim,
+          group   => maillog
+          ;
     }
 
     exec { "exim4 reload":
         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
         refreshonly => true,
     }
+    @ferm::rule { "dsa-exim":
+            description     => "Allow SMTP",
+            rule            => "&SERVICE_RANGE(tcp, smtp, \$SSH_SOURCES)"
+    }
+    @ferm::rule { "dsa-exim-v6":
+            description     => "Allow SMTP",
+            domain          => "ip6",
+            rule            => "&SERVICE_RANGE(tcp, smtp, \$SSH_SOURCES)"
+    }
+    # Do we actually want this?  I'm only doing it because it's harmless
+    # and makes the logs quiet.  There are better ways of making logs quiet,
+    # though.
+    @ferm::rule { "dsa-ident":
+            domain          => "(ip ip6)",
+            description     => "Allow ident access",
+            rule            => "&SERVICE(tcp, 113)"
+    }
 }