From 2e4ccd581403807c15ec6a9eb10c1b596f867e7a Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 22 Sep 2019 11:06:05 +0200 Subject: [PATCH 1/1] Fail if we are not an MX and do not have set MX to the mail relays --- modules/roles/manifests/mta.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/roles/manifests/mta.pp b/modules/roles/manifests/mta.pp index 2a783b480..b91afbddd 100644 --- a/modules/roles/manifests/mta.pp +++ b/modules/roles/manifests/mta.pp @@ -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.') + } } } -- 2.20.1