]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/exim/manifests/init.pp
let's see if this works
[dsa-puppet.git] / modules / exim / manifests / init.pp
index 956cdc099d0b5464e66fef24383f5ee9fa87586f..171e453fc4e5edaf0f2f936326cec7deceabc930 100644 (file)
@@ -156,14 +156,20 @@ class exim {
         path        => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin",
         refreshonly => true,
     }
+
+    case extractnodeinfo($nodeinfo, 'mail_port') {
+      /^(\d+)$/: { $mail_port = $1 }
+      default: { $mail_port = 'smtp' }
+    }
+
     @ferm::rule { "dsa-exim":
             description     => "Allow SMTP",
-            rule            => "&SERVICE_RANGE(tcp, smtp, \$SMTP_SOURCES)"
+            rule            => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_SOURCES)"
     }
     @ferm::rule { "dsa-exim-v6":
             description     => "Allow SMTP",
             domain          => "ip6",
-            rule            => "&SERVICE_RANGE(tcp, smtp, \$SMTP_V6_SOURCES)"
+            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,