Verified Commit db8c3591 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Move entrypoint alt command bypass to after configuration

parent 86a0c1b9
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -48,9 +48,6 @@ def check() -> None:
		sys.exit(1)


if len(argv) > 1 and not argv[1].startswith("-"):
	execvp(argv[1], argv[1:])

if (hostname := environ.get("MTA_HOSTNAME")):
	options["myhostname"] = hostname

@@ -60,6 +57,8 @@ environ["MAIL_CONFIG"] = RUNTIME_CONFIG.as_posix()

run(["/usr/sbin/postconf", "-v", *as_arguments(options)], check=True)

check()
if len(argv) > 1 and not argv[1].startswith("-"):
	execvp(argv[1], argv[1:])

check()
execv("/usr/lib/postfix/sbin/master", ["master", "-i"] + sys.argv[1:])