Allow authentication from webmail directly, fixes #308

This commit is contained in:
kaiyou
2017-11-10 15:54:41 +01:00
parent 28eff398d1
commit 652ca769dc
4 changed files with 6 additions and 4 deletions

View File

@@ -4,11 +4,13 @@ import jinja2
import os
import socket
import glob
convert = lambda src, dst: open(dst, "w").write(jinja2.Template(open(src).read()).render(**os.environ))
# Actual startup script
os.environ["FRONT_ADDRESS"] = socket.gethostbyname("front")
if os.environ["WEBMAIL"] != "none":
os.environ["WEBMAIL_ADDRESS"] = socket.gethostbyname("webmail")
for dovecot_file in glob.glob("/conf/*"):
convert(dovecot_file, os.path.join("/etc/dovecot", os.path.basename(dovecot_file)))