Move TLSA for submission port from exim::mx role to the mailrelay role
authorPeter Palfrader <peter@palfrader.org>
Sun, 22 Sep 2019 09:43:35 +0000 (11:43 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 22 Sep 2019 09:43:44 +0000 (11:43 +0200)
modules/exim/manifests/mx.pp
modules/roles/manifests/mailrelay.pp

index bcee6aa..bf7fd5e 100644 (file)
@@ -23,13 +23,6 @@ class exim::mx(
     notify => Service['exim4'],
   }
 
-  $autocertdir = hiera('paths.auto_certs_dir')
-  dnsextras::tlsa_record{ 'tlsa-submission':
-    zone     => 'debian.org',
-    certfile => "${autocertdir}/${::fqdn}.crt",
-    port     => 587,
-    hostname => $::fqdn,
-  }
   package { 'monitoring-plugins-standard':
     ensure => installed,
   }
index 87b9263..6be074e 100644 (file)
@@ -37,4 +37,12 @@ class roles::mailrelay {
     port   => 'submission',
   }
   Ferm::Rule::Simple <<| tag == 'smtp::server::submission::to::mail-relay' |>>
+
+  $autocertdir = hiera('paths.auto_certs_dir')
+  dnsextras::tlsa_record{ 'tlsa-submission':
+    zone     => 'debian.org',
+    certfile => "${autocertdir}/${::fqdn}.crt",
+    port     => 587,
+    hostname => $::fqdn,
+  }
 }