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 #=================================================