From 10e4b79423b21c8f9f3b7e2ac7076081ccd0adcf Mon Sep 17 00:00:00 2001 From: David Duque Date: Sat, 18 Apr 2020 00:00:35 +0100 Subject: [PATCH] Fixing editconf input --- management/daemon.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/management/daemon.py b/management/daemon.py index 0d9c4774..76fd528d 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -546,10 +546,10 @@ def smtp_relay_set(): utils.write_settings(config, env) # Write on Postfix config edit_conf("/etc/postfix/main.cf", [ - ["relay_host", f"[{config['SMTP_RELAY_HOST']}]:587" if config["SMTP_RELAY_ENABLED"] else ""], - ["smtp_sasl_auth_enable", "yes" if config["SMTP_RELAY_AUTH"] else "no"], - ["smtp_sasl_security_options", "noanonymous" if config["SMTP_RELAY_AUTH"] else "anonymous"], - ["smtp_sasl_tls_security_options", "noanonymous" if config["SMTP_RELAY_AUTH"] else "anonymous"], + "relay_host=" + f"[{config['SMTP_RELAY_HOST']}]:587" if config["SMTP_RELAY_ENABLED"] else "", + "smtp_sasl_auth_enable=" + "yes" if config["SMTP_RELAY_AUTH"] else "no", + "smtp_sasl_security_options=" + "noanonymous" if config["SMTP_RELAY_AUTH"] else "anonymous", + "smtp_sasl_tls_security_options=" + "noanonymous" if config["SMTP_RELAY_AUTH"] else "anonymous" ], False, False) if config["SMTP_RELAY_AUTH"]: # Edit the sasl password