From: Peter Palfrader Date: Sat, 21 Sep 2019 18:31:14 +0000 (+0200) Subject: Add mail_port to hiera and the exim class. not yet used X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=1a00b051fd2f0be260703095b1c7f95ae601243d Add mail_port to hiera and the exim class. not yet used --- diff --git a/data/nodes/klecker.debian.org.yaml b/data/nodes/klecker.debian.org.yaml new file mode 100644 index 000000000..b800305a7 --- /dev/null +++ b/data/nodes/klecker.debian.org.yaml @@ -0,0 +1,3 @@ +--- + +exim::mail_port: 2025 diff --git a/data/nodes/new-klecker.debian.org.yaml b/data/nodes/new-klecker.debian.org.yaml index 16f150496..cafa3c82b 100644 --- a/data/nodes/new-klecker.debian.org.yaml +++ b/data/nodes/new-klecker.debian.org.yaml @@ -5,3 +5,5 @@ classes: roles::ports_mirror::onion_service: true roles::static_mirror_web::onion_service: true + +exim::mail_port: 2025 diff --git a/data/nodes/smit.debian.org.yaml b/data/nodes/smit.debian.org.yaml index 858da15d3..c674aac52 100644 --- a/data/nodes/smit.debian.org.yaml +++ b/data/nodes/smit.debian.org.yaml @@ -4,3 +4,5 @@ classes: roles::syncproxy::syncproxy_name: syncproxy2.eu.debian.org # roles::syncproxy::listen_addr: + +exim::mail_port: 2025 diff --git a/data/nodes/zani.debian.org.yaml b/data/nodes/zani.debian.org.yaml index a823a0af4..1ddca3a4d 100644 --- a/data/nodes/zani.debian.org.yaml +++ b/data/nodes/zani.debian.org.yaml @@ -1,2 +1,4 @@ classes: - roles::buildd + +exim::mail_port: 2025 diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index 6c9608101..5eb492376 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -6,9 +6,11 @@ # @param is_rtmaster this system handles rt.debian.org # @param is_packagesmaster this system handles packagesrt.debian.org # @param is_packagesqamaster this system handles packages.qa.debian.org -# @param smarthost_port the port on which satellites send mail to the smarthost +# @param mail_port override the default incoming mailport (only applicable for hosts behind an incoming relay) +# @param smarthost_port the port on which satellites send mail to the smarthost (needs to be the same on both sides) class exim ( Optional[String] $smarthost, + Optional[Integer] $mail_port, Boolean $use_smarthost = true, Boolean $is_bugsmx = false, Boolean $is_mailrelay = false, @@ -28,6 +30,9 @@ class exim ( } } else { $heavy = true + if $mail_port { + fail('Cannot override mail_port in heavy/no-smarthost hosts') + } } munin::check { 'ps_exim4': script => 'ps_' }