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 <alpha@sigmasquadron.net>
This commit is contained in:
Fernando Rodrigues 2025-07-26 18:47:50 +10:00
parent 0b50a5474d
commit 0b52cd002e
No known key found for this signature in database
GPG key ID: CC3AE2EA00000000

View file

@ -213,7 +213,7 @@ export const configSchema = z
smtp_host: z.string().optional(), smtp_host: z.string().optional(),
smtp_port: portSchema.optional(), smtp_port: portSchema.optional(),
smtp_user: z.string().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_secure: z.boolean().optional(),
smtp_tls_reject_unauthorized: z.boolean().optional(), smtp_tls_reject_unauthorized: z.boolean().optional(),
no_reply: z.string().email().optional() no_reply: z.string().email().optional()