From 5e03c3b52f7d715266f5b68a3b4e4e8c6e97c1f3 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Thu, 17 Nov 2022 23:34:00 +0000 Subject: [PATCH] community: use faffy for mail relay --- cookbooks/community/templates/default/web_only.yml.erb | 10 +++------- roles/community.rb | 3 +++ roles/dev.rb | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/cookbooks/community/templates/default/web_only.yml.erb b/cookbooks/community/templates/default/web_only.yml.erb index d421f1081..a4ff34211 100644 --- a/cookbooks/community/templates/default/web_only.yml.erb +++ b/cookbooks/community/templates/default/web_only.yml.erb @@ -21,7 +21,7 @@ links: # Workaround bug: https://github.com/discourse/discourse_docker/pull/505 # params: -# version: v2.8.11 +# version: v2.8.11 - NOT USED HERE. UPDATE THE EXEC GIT ACTIONS BELOW WITH VERSION env: LC_ALL: en_US.UTF-8 @@ -45,14 +45,10 @@ env: ## on initial signup example 'user1@example.com,user2@example.com' DISCOURSE_DEVELOPER_EMAILS: 'operations@openstreetmap.org' - ## TODO: The SMTP mail server used to validate new accounts and send notifications - # SMTP ADDRESS, username, and password are required - # WARNING the char '#' in SMTP password can cause problems! - DISCOURSE_SMTP_ADDRESS: mail.openstreetmap.org - DISCOURSE_SMTP_PORT: 26 + DISCOURSE_SMTP_ADDRESS: <%= node[:exim][:smarthost_via].split(":", 2)[0] %> + DISCOURSE_SMTP_PORT: <%= node[:exim][:smarthost_via].split(":", 2)[1] || "25" %> DISCOURSE_SMTP_USER_NAME: DISCOURSE_SMTP_PASSWORD: - # DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true) DISCOURSE_SMTP_DOMAIN: community.openstreetmap.org DISCOURSE_NOTIFICATION_EMAIL: community@noreply.openstreetmap.org diff --git a/roles/community.rb b/roles/community.rb index c24e40fbb..b482cfce0 100644 --- a/roles/community.rb +++ b/roles/community.rb @@ -9,6 +9,9 @@ default_attributes( :members => [:grant, :tomh] } } + }, + :exim => { + :smarthost_via => "fafnir.openstreetmap.org:26" } ) diff --git a/roles/dev.rb b/roles/dev.rb index 108d2ed17..18e0edfcf 100644 --- a/roles/dev.rb +++ b/roles/dev.rb @@ -127,7 +127,7 @@ default_attributes( } }, :exim => { - :smarthost_via => "fafnir.openstreetmap.org:26" + :smarthost_via => "fafnir.openstreetmap.org:26" }, :postgresql => { :versions => ["14"], -- 2.43.2