er, not a case statement
[mirror/dsa-puppet.git] / modules / exim / manifests / init.pp
index f488918..075d552 100644 (file)
@@ -156,8 +156,22 @@ class exim {
         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
         refreshonly => true,
     }
-    ferm::rule { "dsa-exim":
-            description     => "Allow smtp access",
-            rule            => "proto tcp mod state state (NEW) dport (25) ACCEPT"
+    $mail_port = extractnodeinfo($nodeinfo, 'mail_port')
+    @ferm::rule { "dsa-exim":
+            description     => "Allow SMTP",
+            rule            => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_SOURCES)"
+    }
+    @ferm::rule { "dsa-exim-v6":
+            description     => "Allow SMTP",
+            domain          => "ip6",
+            rule            => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_V6_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)"
     }
 }