From 7758baf639fae8c4dce5896eb40bf28983754ce5 Mon Sep 17 00:00:00 2001 From: niten Date: Fri, 1 Dec 2023 12:46:51 -0800 Subject: [PATCH] Switch back to correct --- authentik-container.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/authentik-container.nix b/authentik-container.nix index 8be2471..b61ddf4 100644 --- a/authentik-container.nix +++ b/authentik-container.nix @@ -59,7 +59,7 @@ in { }; port = mkOption { type = port; - default = 25; + default = 587; }; user = mkOption { type = str; @@ -139,8 +139,9 @@ in { AUTHENTIK_EMAIL__USERNAME = cfg.smtp.user; AUTHENTIK_EMAIL__PASSWORD = removeSuffix "\n" (readFile cfg.smtp.password-file); - # TODO: THIS IS WRONG BUT MAYBE RIGHT FOR FRANCE? - AUTHENTIK_EMAIL__USE_SSL = true; + AUTHENTIK_EMAIL__USE_SSL = cfg.smtp.port == 465; + AUTHENTIK_EMAIL__USE_TLS = (cfg.smtp.port == 25) + || (cfg.smtp.port == 587); AUTHENTIK_EMAIL__TIMEOUT = 10; AUTHENTIK_EMAIL__FROM = cfg.smtp.from-address; };