SMTP email sending from wrong host

I’ve looked at the configs and I can’t figure out how to change the host that email is being sent from, other than changing the DISCOURSE_HOSTNAME variable. However, based on the comments, If I change that to say… example(dot)com, then if I visit VPS.provider.example(dot)com, I will no longer see the discourse service.

Alrighty, let’s see if I can make that a bit clearer now… (my real domain is replaced with

  • My VPS hosting discourse is on a different machine than my email server (due to the fact that I don’t trust the discourse-setup and launcher scripts being run as root).
  • My email server serves email from example(dot)com
  • Discourse is running on
  • Discourse is logging into smtp.example(dot)com to send emails
  • Discourse is sending emails from
  • Google receives the email and throws it away due to strict SPF and DKIM rules
  • Google sends me an email of said rejection by the next day via the DMARC system

I’m not sure what I can do to fix this, is there anyway to change the sending address? (I’ll be taking a look into spoofing the from the postfix side to see if that helps at all) I’m able to login to the system since I can send emails to example(dot)com and be just fine, but sending to other email providers is another story.

There is a commented line at the bottom of app.yml that will change the sending address. Just edit it with your address and rebuild.


Alright, thanks. I must’ve missed it since it wasn’t in the same place as the other SMTP settings. :confused:


It’s a bit tricky because the other settings are all passed by environment (needed on every container start-up), but that one is a database edit (needed only once ever).