# ./discourse-setup doesn't populate DISCOURSE\_SMTP\_DOMAIN

**URL:** <https://meta.discourse.org/t/discourse-setup-doesnt-populate-discourse-smtp-domain/390624>\
**Category:** Self-hosting\
**Tags:** email\
**Created:** [December 7, 2025, 12:47pm UTC](https://meta.discourse.org/t/discourse-setup-doesnt-populate-discourse-smtp-domain/390624 "2025-12-07T12:47:08Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)\
**Post date:** [December 7, 2025, 9:42pm UTC](https://meta.discourse.org/t/discourse-setup-doesnt-populate-discourse-smtp-domain/390624/10 "2025-12-07T21:42:58Z")

</div>

Thanks, Michael - here’s what actually happened on today’s install and how I worked out that port 587 was the root cause.

When I first ran ./discourse-doctor at [50:30](https://youtu.be/eGSKB8CKjao?t=3030), it clearly showed that outbound SMTP on 587 was failing. There were no successful test emails anywhere in that part of the process. Because of that, at [51:38](https://youtu.be/eGSKB8CKjao?t=3098) I changed the SMTP port to 2525 and rebuilt the container. As soon as the app came back up, the first mail test at [57:46](https://youtu.be/eGSKB8CKjao?t=3466) succeeded immediately.

At [57:58](https://youtu.be/eGSKB8CKjao?t=3478) I noted that my Mailgun account still hadn’t activated - so the doctor was correct in saying SMTP failure was not due to credentials, but to the port being blocked by DigitalOcean.

Since Brevo is quicker to get running, I switched providers: starting the setup at [58:40](https://youtu.be/eGSKB8CKjao?t=3520), selected the Free plan at [1:01:12](https://youtu.be/eGSKB8CKjao?t=3672), swapped the DNS records at [1:02:29](https://youtu.be/eGSKB8CKjao?t=3749), and updated the SMTP settings in app.yml at [1:04:37](https://youtu.be/eGSKB8CKjao?t=3877). At [1:06:08](https://youtu.be/eGSKB8CKjao?t=3968) I pointed out that the GUI displays DISCOURSE\_SMTP\_DOMAIN even when the variable isn’t populated by ./discourse-setup, which is why the blank field initially made me think something was misconfigured.

After finishing the Brevo configuration, I reran ./discourse-doctor at [1:42:10](https://youtu.be/eGSKB8CKjao?t=5530), and at [1:42:25](https://youtu.be/eGSKB8CKjao?t=5545) it confirmed a successful outbound email - again using port 2525.

To answer your specific questions:

- How did I discover DigitalOcean was blocking 587?  
./discourse-doctor reported 587 failing immediately, and switching to 2525 fixed it instantly. The video shows this sequence clearly.
- Did I use rake emails:test?  
Not at the time - I was relying on ./discourse-doctor and the admin UI test email. I didn’t realise emails:test existed until you mentioned it. I’ll absolutely use it going forward since it gives clearer in-container diagnostics.
- Was the missing DISCOURSE\_SMTP\_DOMAIN related?  
No - the blank GUI field was a red herring. The actual issue was DigitalOcean blocking port 587; once I moved to 2525, both Mailgun (once activated) and Brevo worked fine.

Thanks again - your explanation of what DISCOURSE\_SMTP\_DOMAIN actually affects (EHLO only) helped clear up why the missing value didn’t matter.

---

_[View the full topic](https://meta.discourse.org/t/discourse-setup-doesnt-populate-discourse-smtp-domain/390624)._
