From 1d65529c94f54de3cb49ed9584ed95f7860c26fa Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Sun, 18 Jul 2021 18:43:20 +0200 Subject: [PATCH] The lookup could fail; ensure we set something --- core/postfix/start.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/postfix/start.py b/core/postfix/start.py index 1703d45e..701efec3 100755 --- a/core/postfix/start.py +++ b/core/postfix/start.py @@ -37,7 +37,10 @@ os.environ["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", os.environ["ANTISPAM_MILTER_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_MILTER", "antispam:11332") os.environ["LMTP_ADDRESS"] = system.get_host_address_from_environment("LMTP", "imap:2525") os.environ["OUTCLEAN"] = os.environ["HOSTNAMES"].split(",")[0] -os.environ["OUTCLEAN_ADDRESS"] = system.resolve_hostname(os.environ["OUTCLEAN"]) +try: + os.environ["OUTCLEAN_ADDRESS"] = system.resolve_hostname(os.environ["OUTCLEAN"]) +except: + os.environ["OUTCLEAN_ADDRESS"] = "10.10.10.10" for postfix_file in glob.glob("/conf/*.cf"): conf.jinja(postfix_file, os.environ, os.path.join("/etc/postfix", os.path.basename(postfix_file)))