bundles/postfix: disable SPAM BLOCKLIST check if relayhost is set

This commit is contained in:
Franzi 2021-04-01 17:00:53 +02:00
parent 3481d4e13c
commit 957cac5ebc
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -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: