1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-11-25 22:12:28 +02:00

Enable dynamic resolution of hostnames

This commit is contained in:
Florent Daigniere
2022-12-08 12:46:31 +01:00
parent 1a67921b7c
commit 4e3874b0c1
23 changed files with 94 additions and 164 deletions

View File

@@ -11,6 +11,7 @@ from podop import run_server
from socrate import system, conf
log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING"))
system.set_env()
def start_podop():
id_mail = getpwnam('mail')
@@ -24,10 +25,6 @@ def start_podop():
])
# Actual startup script
os.environ["FRONT_ADDRESS"] = system.get_host_address_from_environment("FRONT", "front")
os.environ["ADMIN_ADDRESS"] = system.get_host_address_from_environment("ADMIN", "admin")
os.environ["ANTISPAM_WEBUI_ADDRESS"] = system.get_host_address_from_environment("ANTISPAM_WEBUI", "antispam:11334")
for dovecot_file in glob.glob("/conf/*.conf"):
conf.jinja(dovecot_file, os.environ, os.path.join("/etc/dovecot", os.path.basename(dovecot_file)))