diff --git a/core/postfix/conf/sasl_passwd b/core/postfix/conf/sasl_passwd new file mode 100644 index 00000000..e19d0657 --- /dev/null +++ b/core/postfix/conf/sasl_passwd @@ -0,0 +1 @@ +{{ RELAYHOST }} {{ RELAYUSER }}:{{ RELAYPASSWORD }} \ No newline at end of file diff --git a/core/postfix/start.py b/core/postfix/start.py index b7a3a853..81849c5b 100755 --- a/core/postfix/start.py +++ b/core/postfix/start.py @@ -50,9 +50,7 @@ for map_file in glob.glob("/overrides/*.map"): if "RELAYUSER" in os.environ: path = "/etc/postfix/sasl_passwd" - fileContent = "{} {}:{}".format(os.environ["RELAYHOST"], os.environ["RELAYUSER"], os.environ["RELAYPASSWORD"]) - with open(path, "w") as f: - f.write(fileContent) + convert("/conf/sasl_passwd", path) os.system("postmap {}".format(path)) convert("/conf/rsyslog.conf", "/etc/rsyslog.conf")