Implement #2213: slow transports

This commit is contained in:
Florent Daigniere
2022-02-19 18:37:37 +01:00
parent 9a99f4253b
commit 7166e7d2b2
3 changed files with 21 additions and 4 deletions

View File

@@ -74,9 +74,10 @@ if os.path.exists("/overrides/mta-sts-daemon.yml"):
else:
conf.jinja("/conf/mta-sts-daemon.yml", os.environ, "/etc/mta-sts-daemon.yml")
if not os.path.exists("/etc/postfix/tls_policy.map.lmdb"):
open("/etc/postfix/tls_policy.map", "a").close()
os.system("postmap /etc/postfix/tls_policy.map")
for policy in ['tls_policy', 'transport']:
if not os.path.exists(f'/etc/postfix/{policy}.map.lmdb'):
open(f'/etc/postfix/{policy}.map', 'a').close()
os.system(f'postmap /etc/postfix/{policy}.map')
if "RELAYUSER" in os.environ:
path = "/etc/postfix/sasl_passwd"