Trouble setting up AWS SES with Helm Install

AI-generated summary

kuzea is having trouble configuring AWS SES with a Helm-installed Discourse on Kubernetes. Despite setting SMTP variables like DISCOURSE_SMTP_NOTIFICATION_EMAIL, DISCOURSE_SMTP_DOMAIN, and DISCOURSE_NOTIFICATION_EMAIL in both sidekiq and discourse extraEnvVars, test emails fail with the error: 554 Transaction failed: Invalid domain name: '127.0.0.1'. The email configuration UI shows an empty domain, suggesting Discourse may not recognize its hostname. kuzea tried following documentation but found conflicting variable names and was unable to edit app.yml inside the container. pfaffman initially suggested a full standard install to ensure all required steps (database migration, asset precompilation, domain/HTTPS setup) are completed, but later acknowledged the error might indicate a hostname resolution issue within Discourse itself pfaffman. kuzea confirmed containers start fine and is focused solely on email delivery. The core issue appears to be Discourse using 127.0.0.1 as the domain instead of the configured hostname, likely due to missing or misconfigured environment variables controlling the application’s base URL or domain.

Hello,

I recently installed Discourse to my Kubernetes cluster using the bitnami discourse helm chart. I am attempting to get it working with the AWS SES I have configured currently that works with other addresses and services I have running, but I cant seem to get Discourse to work.

I’ve looked over the various documentation and there seems to be conflicting information whether the variable should be DISCOURSE_SMTP_NOTIFICATION_EMAIL or DISCOURSE_NOTIFICATION EMAIL (Troubleshoot email on a new Discourse install and discourse_docker/samples/standalone.yml at main · discourse/discourse_docker · GitHub) so I just put both in the extra env variables.

smtp:
  enabled: true
  host: "email-smtp.us-west-2.amazonaws.com"
  port: "587"
  user: "XXXXX"
  password: "XXXXX"
  protocol: "tls"
  auth: ""
  existingSecret: ""

sidekiq:
  extraEnvVars:
    - name: DISCOURSE_SMTP_NOTIFICATION_EMAIL
      value: discourse@exampledomain.com
    - name: DISCOURSE_SMTP_DOMAIN
      value: exampledomain.com
    - name: DISCOURSE_NOTIFICATION_EMAIL
      value: discourse@exampledomain.com

discourse:
  extraEnvVars:
    - name: DISCOURSE_SMTP_NOTIFICATION_EMAIL
      value: discourse@exampledomain.com
    - name: DISCOURSE_SMTP_DOMAIN
      value: exampledomain.com
    - name: DISCOURSE_NOTIFICATION_EMAIL
      value: discourse@exampledomain.com

When I send a test email, I get the following error in the “skipped” section:

554 Transaction failed: Invalid domain name: '127.0.0.1'.

The troubleshooting guide mentioned the following:

The default email from address is based on the install domain plus subdomain, so if your URL is `discourse.example.com` it will be:

`noreply@discourse.example.com`

But if your mail provider is expecting:

`noreply@example.com`

… you may have problems! To get around this, edit and uncomment this exec line in `app.yml`

However, I am unable to comment out that line once in the container.

I am deploying Discourse to discourse.subdomain.exampledomain.com and I was trying to set the SMTP domain value using the DISCOURSE_SMTP_DOMAIN extra env variabe, but maybe that is not working because in the email configuration settings on the website, the domain name is showing up empty.

Is there some value or configuration that I am missing to get it to work?

Thank you!

You need a whole lot more variables defined to crank up that container. And you need to migrate the database and precompile assets, for starters. And you need a domain name, and something to handle the https certs.

You should start with a standard install, and then work from there. Once you have something that works that way, you can get some hints from

 ./launcher start-cmd app

Sorry, I shouldve clarified. The discourse containers all start up okay, I am just having issues with the emailing portion of it. Should I still go through the standard install process anyway?

Thanks for the speedy reply!

Hmm. Don’t know. Maybe I misunderstood the error messages.

That looks like Discourse doesn’t know its hostname? But I could be wrong.