From 5cebd1683797923296b0080290c88b8110ef76d8 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 10 Jun 2025 12:15:54 +0200 Subject: [PATCH] fix: working SMTP setup --- .env.sample | 2 ++ abra.sh | 2 +- compose.smtp.yml | 2 ++ rauthy.cfg.tmpl | 8 ++++---- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.env.sample b/.env.sample index 3a742af..41018fe 100644 --- a/.env.sample +++ b/.env.sample @@ -17,5 +17,7 @@ SECRET_HQL_API_VERSION=v1 #COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml" #SMTP_ENABLED=1 #EMAIL_SUB_PREFIX="Rauthy IAM" +#SMTP_URL= +#SMTP_FROM= #SMTP_USERNAME= #SECRET_SMTP_PASSWORD_VERSION=v1 diff --git a/abra.sh b/abra.sh index 12978ab..3aa4251 100644 --- a/abra.sh +++ b/abra.sh @@ -1 +1 @@ -export RAUTHY_CFG_VERSION=v1 +export RAUTHY_CFG_VERSION=v2 diff --git a/compose.smtp.yml b/compose.smtp.yml index 958cc32..c8a7881 100644 --- a/compose.smtp.yml +++ b/compose.smtp.yml @@ -5,7 +5,9 @@ services: app: environment: - EMAIL_SUB_PREFIX + - SMTP_ENABLED - SMTP_FROM + - SMTP_URL - SMTP_USERNAME secrets: - smtp_password diff --git a/rauthy.cfg.tmpl b/rauthy.cfg.tmpl index f514bdb..371dc48 100644 --- a/rauthy.cfg.tmpl +++ b/rauthy.cfg.tmpl @@ -615,12 +615,12 @@ EMAIL_SUB_PREFIX="{{ env "EMAIL_SUB_PREFIX" }}" # TLS fails. It will never allow an unencrypted connection. # You might want to set `SMTP_DANGER_INSECURE=true` if you # need this for local dev. -#SMTP_URL= -#SMTP_USERNAME="{{ env "SMTP_USERNAME" }}" -#SMTP_PASSWORD="{{ secret "smtp_password" }}" +SMTP_URL="{{ env "SMTP_URL" }}" +SMTP_USERNAME="{{ env "SMTP_USERNAME" }}" +SMTP_PASSWORD="{{ secret "smtp_password" }}" # Format: "Rauthy " # default: "Rauthy " -#SMTP_FROM="{{ env "SMTP_FROM" }}" +SMTP_FROM="{{ env "SMTP_FROM" }}" # The number of retries that should be done for connecting to # the given SMTP_URL.