Even heavy_exim hosts can get their system mail from relays
authorPeter Palfrader <peter@palfrader.org>
Sat, 21 Sep 2019 22:15:33 +0000 (00:15 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sat, 21 Sep 2019 22:15:33 +0000 (00:15 +0200)
modules/roles/manifests/mta.pp

index 486f3e9..e85c444 100644 (file)
@@ -11,14 +11,17 @@ class roles::mta(
   if $type == 'exim4' {
     if $mailrelay {
       include roles::mailrelay
-    } elsif $heavy {
-      include exim::mx
     } else {
-      include exim
+      if $heavy {
+        include exim::mx
+      } else {
+        include exim
+      }
 
       $mxdata = dig($deprecated::nodeinfo, 'ldap', 'mXRecord')
       if $mxdata and $mxdata.any |$item| { $item =~ /INCOMING-MX/ } {
-        $mailport = lookup('exim::mail_port')
+        $mailport = lookup( { 'name' => 'exim::mail_port', 'default_value' => undef } )
+
 
         @@concat::fragment { "manualroute-to-${::fqdn}":
           tag     => 'exim::manualroute::to::mailrelay',