From 0b52cd002ede24bac9d9ef6104f8d5e1b6d57b49 Mon Sep 17 00:00:00 2001 From: Fernando Rodrigues Date: Sat, 26 Jul 2025 18:47:50 +1000 Subject: [PATCH] add an environment variable for the smtp_pass config option The password for secure authentication may be sensitive, so it is best to not leave it lying around in a config file. This commit introduces the EMAIL_SMTP_PASS environment variable, which can be set to configure the SMTP password without writing it to the configuration file. Signed-off-by: Fernando Rodrigues --- server/lib/readConfigFile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/readConfigFile.ts b/server/lib/readConfigFile.ts index f738b986..da1e1649 100644 --- a/server/lib/readConfigFile.ts +++ b/server/lib/readConfigFile.ts @@ -213,7 +213,7 @@ export const configSchema = z smtp_host: z.string().optional(), smtp_port: portSchema.optional(), smtp_user: z.string().optional(), - smtp_pass: z.string().optional(), + smtp_pass: z.string().optional().transform(getEnvOrYaml("EMAIL_SMTP_PASS")), smtp_secure: z.boolean().optional(), smtp_tls_reject_unauthorized: z.boolean().optional(), no_reply: z.string().email().optional()