mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-25 07:47:05 +00:00
Swap tuple by a list
This commit is contained in:
parent
858251045d
commit
625eca8ea4
@ -545,12 +545,12 @@ def smtp_relay_set():
|
|||||||
config["SMTP_RELAY_USER"] = newconf.get("user") == "true"
|
config["SMTP_RELAY_USER"] = newconf.get("user") == "true"
|
||||||
utils.write_settings(config, env)
|
utils.write_settings(config, env)
|
||||||
# Write on Postfix config
|
# Write on Postfix config
|
||||||
edit_conf("/etc/postfix/main.cf", (
|
edit_conf("/etc/postfix/main.cf", [
|
||||||
("relay_host", f"[{config['SMTP_RELAY_HOST']}]:587" if config["SMTP_RELAY_ENABLED"] else ""),
|
["relay_host", f"[{config['SMTP_RELAY_HOST']}]:587" if config["SMTP_RELAY_ENABLED"] else ""],
|
||||||
("smtp_sasl_auth_enable", "yes" if config["SMTP_RELAY_AUTH"] else "no"),
|
["smtp_sasl_auth_enable", "yes" if config["SMTP_RELAY_AUTH"] else "no"],
|
||||||
("smtp_sasl_security_options", "noanonymous" if config["SMTP_RELAY_AUTH"] else "anonymous"),
|
["smtp_sasl_security_options", "noanonymous" if config["SMTP_RELAY_AUTH"] else "anonymous"],
|
||||||
("smtp_sasl_tls_security_options", "noanonymous" if config["SMTP_RELAY_AUTH"] else "anonymous"),
|
["smtp_sasl_tls_security_options", "noanonymous" if config["SMTP_RELAY_AUTH"] else "anonymous"],
|
||||||
), False, False)
|
], False, False)
|
||||||
if config["SMTP_RELAY_AUTH"]:
|
if config["SMTP_RELAY_AUTH"]:
|
||||||
# Edit the sasl password
|
# Edit the sasl password
|
||||||
with open("/etc/postfix/sasl_passwd", "w") as f:
|
with open("/etc/postfix/sasl_passwd", "w") as f:
|
||||||
|
Loading…
Reference in New Issue
Block a user