Fail if we are not an MX and do not have set MX to the mail relays
authorPeter Palfrader <peter@palfrader.org>
Sun, 22 Sep 2019 09:06:05 +0000 (11:06 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 22 Sep 2019 09:06:39 +0000 (11:06 +0200)
modules/roles/manifests/mta.pp

index 2a783b4..b91afbd 100644 (file)
@@ -45,5 +45,9 @@ class roles::mta(
         default => $mailport,
       }
     }
+  } else {
+    if ! defined(Class['exim::mx']) and ! defined(Class['postfix']) {
+      fail('We are not an exim::mx (or a postfix) yet do not have set our MXs to INCOMING-MX.')
+    }
   }
 }