The discussion revolves around configuring SMTP in a Docker container for Discourse, installed via a Bitnami Helm chart. tobi1 is having trouble modifying the SMTP email configuration and asks for suggestions.
@pfaffman and Falco offer guidance, providing examples of SMTP environment variables and links to relevant documentation. tobi1 updates the environment variables, but still encounters issues when trying to send a test email.
Falco suggests entering the running container and executing a test mailer command to inspect the exception. tobi1 follows these steps and encounters an error, which Falco notes is unexpected and may be related to the unsupported Bitnami install.
@pfaffman clarifies that only the official Discourse install is supported and that using a Helm chart is not a viable option. tobi1 expresses a willingness to switch to a more supported install, and pfaffman offers assistance for a fee.
Processing by Admin::UsersController#show as JSON
Parameters: {"id"=>"1"}
Completed 200 OK in 1978ms (Views: 0.6ms | ActiveRecord: 0.0ms | Allocations: 195416)
Started GET "/groups/search.json" for 10.0.0.50 at 2022-08-10 11:55:05 +0000
Processing by GroupsController#search as JSON
Completed 200 OK in 1189ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 133325)
Started GET "/admin/email.json" for 10.0.0.50 at 2022-08-10 11:55:17 +0000
Processing by Admin::EmailController#index as JSON
Completed 200 OK in 23ms (Views: 1.2ms | ActiveRecord: 0.0ms | Allocations: 864)
Started POST "/admin/email/test" for 10.0.0.50 at 2022-08-10 11:55:20 +0000
Processing by Admin::EmailController#test as */*
Parameters: {"email_address"=>"test@gmail.com"}
Completed 422 Unprocessable Entity in 20ms (Views: 1.1ms | ActiveRecord: 0.0ms | Allocations: 2037)
Started GET "/about.json" for 10.0.0.47 at 2022-08-10 11:55:46 +0000
Processing by AboutController#index as JSON
Completed 200 OK in 67ms (Views: 0.3ms | ActiveRecord: 0.0ms | Allocations: 9503)
Started GET "/site/basic-info.json" for 10.0.0.47 at 2022-08-10 11:55:46 +0000
Processing by SiteController#basic_info as JSON
Completed 200 OK in 254ms (Views: 0.5ms | ActiveRecord: 0.0ms | Allocations: 33103)
Started GET "/site/basic-info.json" for 10.0.0.47 at 2022-08-10 11:55:47 +0000
Processing by SiteController#basic_info as JSON
Completed 200 OK in 80ms (Views: 0.8ms | ActiveRecord: 0.0ms | Allocations: 4260)
RAILS_ENV=production bundle exec rails c
irb(main):002:0> message = TestMailer.send_test("test@gmail.com")
Traceback (most recent call last):
2: from app/mailers/test_mailer.rb:7:in `send_test'
1: from lib/email/build_email_helper.rb:8:in `build_email'
ArgumentError (:arguments expected to be an Array of individual string args)
Also, this here does not work:
root@discourse-69c7f5475c-h9qf5:/opt/bitnami/discourse# RAILS_ENV=production bundle exec rails c message = TestMailer.send_test("test@gmail.com")
bash: syntax error near unexpected token `('
[5] pry(main)> message = TestMailer.send_test("test@gmail.com")
TranslationOverride Exists? (0.8ms) SELECT 1 AS one FROM "translation_overrides" WHERE "translation_overrides"."locale" = 'en' AND "translation_overrides"."translation_key" = 'test_mailer.subject_template' LIMIT 1
(0.2ms) SELECT "translation_overrides"."translation_key", "translation_overrides"."value" FROM "translation_overrides" WHERE "translation_overrides"."locale" = 'en'
TestMailer#send_test: processed outbound mail in 259.9ms
=> #<Mail::Message:212740, Multipart: false, Headers: <From: "Discourse" <noreply@unconfigured.discourse.org>>, <Reply-To: "Discourse" <noreply@unconfigured.discourse.org>>, <To: test@gmail.com>, <Subject: [Discourse] Email Deliverability Test>, <Mime-Version: 1.0>, <Content-Type: text/plain>, <X-Auto-Response-Suppress: All>, <Auto-Submitted: auto-generated>>
Since you are using an unsupported-install packaged by Bitnami, it’s expected for it to be broken on subtle ways. We do not support such installs here, so you will want to reach out to their own support channel at Issues · bitnami/charts · GitHub.
I helped someone with a K8s install last week. It took me and a couple of talented engineers over 6 hours (but it might have been 10,not counting the time they spent without me) to get it going using their tooling.
I’ve considered creating images that should be launched from a helm chart, but haven’t don’t it yet. If you have a budget, please contact me via pm or email and I might be able to help.