fix: email smtp auth mode (#4571)

Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
This commit is contained in:
Piyush Gupta
2025-01-10 15:00:28 +05:30
committed by GitHub
parent 5970ff917f
commit 9905199055
13 changed files with 117 additions and 59 deletions

View File

@@ -40,6 +40,7 @@ x-environment: &environment
# SMTP_PORT:
# SMTP_USER:
# SMTP_PASSWORD:
# SMTP_AUTHENTICATED:
# (Additional option for TLS (port 465) only)
# SMTP_SECURE_ENABLED: 1

View File

@@ -235,6 +235,9 @@ EOT
echo -n "Enter your SMTP password: "
read smtp_password
echo -n "Enable Authenticated SMTP? Enter 1 for yes and 0 for no(default is 1): "
read smtp_authenticated
echo -n "Enable Secure SMTP (use SSL)? Enter 1 for yes and 0 for no: "
read smtp_secure_enabled
@@ -245,6 +248,7 @@ EOT
smtp_port=""
smtp_user=""
smtp_password=""
smtp_authenticated=1
smtp_secure_enabled=0
fi
@@ -271,6 +275,7 @@ EOT
sed -i "s|# SMTP_SECURE_ENABLED:|SMTP_SECURE_ENABLED: $smtp_secure_enabled|" docker-compose.yml
sed -i "s|# SMTP_USER:|SMTP_USER: \"$smtp_user\"|" docker-compose.yml
sed -i "s|# SMTP_PASSWORD:|SMTP_PASSWORD: \"$smtp_password\"|" docker-compose.yml
sed -i "s|# SMTP_AUTHENTICATED:|SMTP_AUTHENTICATED: $smtp_authenticated|" docker-compose.yml
fi
awk -v domain_name="$domain_name" -v hsts_enabled="$hsts_enabled" '