From eee5dbf755947cdb0a153c0f94ce86fc0383070b Mon Sep 17 00:00:00 2001 From: David Duque Date: Sat, 18 Apr 2020 00:22:10 +0100 Subject: [PATCH] Is this it? --- management/daemon.py | 2 +- management/editconf.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/management/daemon.py b/management/daemon.py index 3304f12e..dad7c14a 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -551,7 +551,7 @@ def smtp_relay_set(): "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" - ], r"\s*=\s*", "#") + ], delimiter_re=r"\s*=\s*", delimiter="=", comment_char="#") if config["SMTP_RELAY_AUTH"]: # Edit the sasl password with open("/etc/postfix/sasl_passwd", "w") as f: diff --git a/management/editconf.py b/management/editconf.py index 60322203..27bbd93e 100755 --- a/management/editconf.py +++ b/management/editconf.py @@ -26,7 +26,7 @@ import sys, re -def edit_conf(filename, settings, delimiter_re, comment_char, folded_lines = False, testing = False): +def edit_conf(filename, settings, delimiter_re, delimiter, comment_char, folded_lines = False, testing = False): found = set() buf = "" input_lines = list(open(filename, "r+")) @@ -140,4 +140,4 @@ if __name__ == "__main__": print("Invalid command line: ", subprocess.list2cmdline(sys.argv)) sys.exit(1) - edit_conf(filename, settings, delimiter_re, comment_char, folded_lines, testing) + edit_conf(filename, settings, delimiter_re, delimiter, comment_char, folded_lines, testing)