You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-29 22:37:58 +02:00
Add authentication for email relays
This commit is contained in:
@@ -48,6 +48,13 @@ for map_file in glob.glob("/overrides/*.map"):
|
||||
os.system("postmap {}".format(destination))
|
||||
os.remove(destination)
|
||||
|
||||
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)
|
||||
os.system("postmap {}".format(path))
|
||||
|
||||
convert("/conf/rsyslog.conf", "/etc/rsyslog.conf")
|
||||
|
||||
# Run Podop and Postfix
|
||||
|
||||
Reference in New Issue
Block a user