mirror of
https://github.com/optim-enterprises-bv/Mailu.git
synced 2025-11-02 02:57:56 +00:00
Format relay credentials file with jinja
This commit is contained in:
1
core/postfix/conf/sasl_passwd
Normal file
1
core/postfix/conf/sasl_passwd
Normal file
@@ -0,0 +1 @@
|
||||
{{ RELAYHOST }} {{ RELAYUSER }}:{{ RELAYPASSWORD }}
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user