From 623a535ff7b70ac98e56551378eacf39da65e0cf Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 22 Sep 2019 00:23:58 +0200 Subject: [PATCH] Set port to 25 explicitly instead of undef if we do not have it overwritten for this host --- modules/roles/manifests/mailrelay.pp | 2 +- modules/roles/manifests/mta.pp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/roles/manifests/mailrelay.pp b/modules/roles/manifests/mailrelay.pp index b17bb019d..2fba6a6aa 100644 --- a/modules/roles/manifests/mailrelay.pp +++ b/modules/roles/manifests/mailrelay.pp @@ -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, } } diff --git a/modules/roles/manifests/mta.pp b/modules/roles/manifests/mta.pp index b985cd03a..c184f968d 100644 --- a/modules/roles/manifests/mta.pp +++ b/modules/roles/manifests/mta.pp @@ -33,7 +33,10 @@ class roles::mta( } Ferm::Rule::Simple <<| tag == 'smtp::server::from::mailrelay' |>> { - port => $mailport + port => $mailport == undef ? { + true => 25, + default => $mailport, + } } } } -- 2.20.1