From 13beebc31c1ef617e799709951059648a4465740 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 9 Nov 2023 20:01:57 +0100 Subject: [PATCH] Set proper mail configuration (#450) * email * Update _common.sh * Update scripts/_common.sh Co-authored-by: Pierre de La Morinerie * Auto-update README --------- Co-authored-by: Pierre de La Morinerie Co-authored-by: yunohost-bot --- conf/config.json | 6 +++--- manifest.toml | 1 + scripts/_common.sh | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/conf/config.json b/conf/config.json index 02a5719..8ddad7c 100644 --- a/conf/config.json +++ b/conf/config.json @@ -253,12 +253,12 @@ "UseChannelInEmailNotifications": false, "RequireEmailVerification": false, "FeedbackName": "Mattermost notification", - "FeedbackEmail": "no-reply@__DOMAIN__", + "FeedbackEmail": "no-reply@__MAIN_DOMAIN__", "ReplyToAddress": "", "FeedbackOrganization": "", "EnableSMTPAuth": false, - "SMTPUsername": "mattermost", - "SMTPPassword": "__SMTP_USER_PWD__", + "SMTPUsername": "__APP__", + "SMTPPassword": "__MAIL_PWD__", "SMTPServer": "localhost", "SMTPPort": "25", "SMTPServerTimeout": 10, diff --git a/manifest.toml b/manifest.toml index 4a62848..465666e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -87,6 +87,7 @@ ram.runtime = "50M" arm64.sha256 = "c75860817858eddde852075ec0c0091f53cec7858be30cc7f849f31e215bd23d" [resources.system_user] + allow_email = true [resources.install_dir] diff --git a/scripts/_common.sh b/scripts/_common.sh index 0d8f29f..58454f3 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,6 +4,11 @@ # COMMON VARIABLES #================================================= +# We want Mattermost emails to be sent from the main domain +# (the one for which the emails headers are properly configured), +# and not the subdomain or secondary domain used for Mattermost. +main_domain=$(cat /etc/yunohost/current_host) + #================================================= # PERSONAL HELPERS #=================================================