diff --git a/contrib/testing/smtp-relayhost-check.py b/contrib/testing/smtp-relayhost-check.py index 8e64b0c..9815d80 100755 --- a/contrib/testing/smtp-relayhost-check.py +++ b/contrib/testing/smtp-relayhost-check.py @@ -191,6 +191,15 @@ def perform_test() -> None: if os.geteuid() != 0: raise SMTP09Error("the live relayhost test must run as root") original = SMTP07.read_smtp_configuration() + configured_host = str( + original.get("internal_relay_bind_address", "") + ).strip() + if configured_host in {"", "0.0.0.0", "::"}: + configured_host = "127.0.0.1" + SMTP07.INTERNAL_HOST = configured_host + SMTP07.INTERNAL_PORT = int( + original.get("internal_relay_port", SMTP07.INTERNAL_PORT) + ) originally_active = SMTP07.service_active() if not originally_active: raise SMTP09Error("bongo.service must be active before this live test")