Commit d4c46013 authored by Daniel Dehennin's avatar Daniel Dehennin

Merge branch 'fix/mail-config' into 'master'

fix(config): notification mail should be set as soon as possible and configure SMTP authentication mechanism

See merge request la-crise/discourse-formula!11
parents b6ccb619 464f7345
......@@ -65,7 +65,7 @@ env:
## TODO: List of comma delimited emails that will be made admin and developer
## on initial signup example 'user1@example.com,user2@example.com'
DISCOURSE_DEVELOPER_EMAILS: {{ discourse.developer_emails }}
DISCOURSE_DEVELOPER_EMAILS: '{{ discourse.developer_emails }}'
DISCOURSE_SMTP_DOMAIN: {{ discourse.hostname }}
## TODO: The SMTP mail server used to validate new accounts and send notifications
......@@ -75,6 +75,7 @@ env:
DISCOURSE_SMTP_PORT: {{ discourse | traverse('smtp:port') }}
DISCOURSE_SMTP_USER_NAME: {{ discourse | traverse('smtp:user_name') }}
DISCOURSE_SMTP_PASSWORD: {{ discourse | traverse('smtp:password') }}
DISCOURSE_SMTP_AUTHENTICATION: {{ discourse | traverse('smtp:auth_mechanism', 'plain') }}
DISCOURSE_SMTP_ENABLE_START_TLS: {{ discourse | traverse('smtp:start_tls') | lower }} # (optional, default true)
## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
......@@ -112,5 +113,5 @@ run:
- exec: echo "Beginning of custom commands"
## If you want to set the 'From' email address for your first registration, uncomment and change:
## After getting the first signup email, re-comment the line. It only needs to run once.
#- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
- exec: rails r "SiteSetting.notification_email='{{ discourse | traverse('settings:notification_email') }}'"
- exec: echo "End of custom commands"
......@@ -9,6 +9,7 @@ discourse:
port: '25'
user_name: 'me@example.net'
start_tls: true
auth_mechanism: 'login'
# the following must be set in pillar
# smtp_password: ~
letsencrypt:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment