Set port to 25 explicitly instead of undef if we do not have it overwritten for this...
authorPeter Palfrader <peter@palfrader.org>
Sat, 21 Sep 2019 22:23:58 +0000 (00:23 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 21 Sep 2019 22:23:58 +0000 (00:23 +0200)
modules/roles/manifests/mailrelay.pp
modules/roles/manifests/mta.pp

index b17bb01..2fba6a6 100644 (file)
@@ -28,7 +28,7 @@ class roles::mailrelay {
   @@ferm::rule::simple { "dsa-smtp-from-mailrelay-${::fqdn}":
     tag         => 'smtp::server::from::mailrelay',
     description => 'Allow smtp access from a mailrelay',
-    port        => '25',
+    port        => '7', # will be overwritten on collection
     saddr       => $base::public_addresses,
   }
 }
index b985cd0..c184f96 100644 (file)
@@ -33,7 +33,10 @@ class roles::mta(
         }
 
         Ferm::Rule::Simple <<| tag == 'smtp::server::from::mailrelay' |>> {
-          port => $mailport
+          port => $mailport == undef ? {
+            true    => 25,
+            default => $mailport,
+          }
         }
       }
     }