From 957cac5ebc34a5925ab5a48bff159178f59fd3e1 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 1 Apr 2021 17:00:53 +0200 Subject: [PATCH] bundles/postfix: disable SPAM BLOCKLIST check if relayhost is set --- bundles/postfix/metadata.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/postfix/metadata.py b/bundles/postfix/metadata.py index f5850b0..ffdf6f6 100644 --- a/bundles/postfix/metadata.py +++ b/bundles/postfix/metadata.py @@ -100,8 +100,12 @@ def iptables(metadata): 'icinga2_api/postfix/services', ) def icinga2(metadata): - services = {} + if metadata.get('postfix/relayhost', ''): + # The system does not send mail on its own. There is no point in + # checking it for any listings. + return {} + services = {} for ip_type in repo.libs.tools.resolve_identifier(repo, node.name).values(): for ip in ip_type: if not ip.is_private: