From 4d2ab6a3f21d94f5d31cb9b72e17c906307b4c1b Mon Sep 17 00:00:00 2001 From: Limezy Date: Tue, 9 Nov 2021 17:24:53 +0700 Subject: [PATCH] SMTP checks + better secret keys handling --- conf/.env | 16 ++++++++-------- scripts/install | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/conf/.env b/conf/.env index 768da68..8429ab6 100644 --- a/conf/.env +++ b/conf/.env @@ -10,11 +10,11 @@ # Generate a hex-encoded 32-byte random key. You should use `openssl rand -hex 32` # in your terminal to generate a random value. -SECRET_KEY=53b654d84c820573dc19e86d09c4c47d44c17b32055154a0cbc75efc5aee00fb +SECRET_KEY=__SECRET_KEY__ # Generate a unique random key. The format is not important but you could still use # `openssl rand -hex 32` in your terminal to produce this. -UTILS_SECRET=7cbd5fbf647a8f85f06560c6dad74d2eee21fd4e1889f91dabb7dd873c7428be +UTILS_SECRET=__UTILS_SECRET__ # For production point these at your databases, in development the default # should work out of the box. @@ -139,14 +139,14 @@ SENTRY_DSN= # To support sending outgoing transactional emails such as "document updated" or # "you've been invited" you'll need to provide authentication for an SMTP server -SMTP_HOST=127.0.0.1 -SMTP_PORT=465 +SMTP_HOST='localhost' +SMTP_PORT='25' SMTP_USERNAME='' SMTP_PASSWORD='' -SMTP_FROM_EMAIL=outline@__DOMAIN__ -SMTP_REPLY_EMAIL=outline@__DOMAIN__ -SMTP_TLS_CIPHERS= -SMTP_SECURE=false +SMTP_FROM_EMAIL='__APP__@__DOMAIN__' +SMTP_REPLY_EMAIL='webmaster@__DOMAIN__' +SMTP_TLS_CIPHERS='' +SMTP_SECURE='true' # Custom logo that displays on the authentication screen, scaled to height: 60px # TEAM_LOGO=https://example.com/images/logo.png diff --git a/scripts/install b/scripts/install index 3275a8b..0c4d965 100755 --- a/scripts/install +++ b/scripts/install @@ -37,6 +37,8 @@ else language_key="en_US" fi +secret_key=`openssl rand -hex 32` +utils_secret=`openssl rand -hex 32` slackkey=$YNH_APP_ARG_SLACKKEY slacksecret=$YNH_APP_ARG_SLACKSECRET @@ -67,6 +69,8 @@ ynh_script_progression --message="Storing installation settings..." --time --wei ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=language --value=$language +ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key +ynh_app_setting_set --app=$app --key=utils_secret --value=$utils_secret #================================================= # STANDARD MODIFICATIONS