# How to set domain value in Email -\> Server Settings

**URL:** https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902
**Category:** Self-hosting
**Created:** [June 4, 2025, 8:14pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902 "2025-06-04T20:14:18Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![sallypf](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sallypf](https://meta.discourse.org/u/sallypf)
#### Post date: [June 4, 2025, 8:14pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/1 "2025-06-04T20:14:18Z")

</div>

I just saw this domain value on Email Settings page, I didn’t see it during installation. Where to set this domain value?

 ![This image shows an email settings page with options for configuring server settings, including the domain "discourse.example.com," for emails sent to members. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/b/e/e/bee67a32b8e63ba3f18494af440d4a32eb2cf7b9.png)

---

<div class="post-metadata">

### Author: ![Andrew\_Rowe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrew_rowe/32/445877_2.png) [@Andrew\_Rowe](https://meta.discourse.org/u/Andrew_Rowe)
#### Post date: [June 4, 2025, 11:21pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/2 "2025-06-04T23:21:12Z")

</div>

since no one is jumping in I think it is in app.yml ???  
I think there is a command line way to set your mail setting as well.  
ah… look here

> [@Troubleshoot email on a new Discourse install](https://meta.discourse.org/t/troubleshoot-email-on-a-new-discourse-install/16326#p-55742-did-you-enter-email-settings-correctly-2):
>
> You just installed Discourse via [the install guide](https://github.com/discourse/discourse/blob/main/docs/INSTALL.md), but email doesn’t seem to work. Unfortunately this means you can’t log in as an admin to finalize the install. cry Let’s troubleshootize! Try the doctor woman_health_workerIf you run ./discourse-doctor it will check several ways that your mail configuration might be broken, and offer advice. Try that first. Did you enter email settings correctly? The simplest way is to run ./discourse-setup again. Did you enter everything correctly? B…

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [June 5, 2025, 12:15am UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/3 "2025-06-05T00:15:35Z")

</div>

You almost definitely don’t need it.

It sets the EHLO domain.

---

<div class="post-metadata">

### Author: ![sallypf](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sallypf](https://meta.discourse.org/u/sallypf)
#### Post date: [June 5, 2025, 10:53am UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/4 "2025-06-05T10:53:19Z")

</div>

> [@supermathie](#):
>
> You almost definitely don’t need it.

yes, I’ve already figured that out. Emails work properly. I was just wondering why it is set to this value by default? Doesn’t seem to be proper even if it doesn’t affect emails.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [June 5, 2025, 2:58pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/5 "2025-06-05T14:58:11Z")

</div>

> [@sallypf](#):
>
> I was just wondering why it is set to this value by default?

The default value is blank:

> <https://github.com/discourse/discourse/blob/main/config/discourse_defaults.conf#L74>

---

<div class="post-metadata">

### Author: ![sallypf](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sallypf](https://meta.discourse.org/u/sallypf)
#### Post date: [June 5, 2025, 3:01pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/6 "2025-06-05T15:01:05Z")

</div>

> [@supermathie](#):
>
> The default value is blank:

As far as I can remember, I didn’t see and/or didn’t enter any such value so installation process must be filling this from somewhere? I just re-installed and still didn’t see any option to fill this field.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [June 5, 2025, 3:03pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/7 "2025-06-05T15:03:11Z")

</div>

It’s probably set in your container configuration file, the default contents in the template are:

```plaintext
  DISCOURSE_SMTP_ADDRESS: smtp.example.com
  #DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: user@example.com
  DISCOURSE_SMTP_PASSWORD: pa$$word
  #DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
  #DISCOURSE_SMTP_DOMAIN: discourse.example.com # (required by some providers)
  #DISCOURSE_NOTIFICATION_EMAIL: noreply@discourse.example.com # (address to send notifications from)

```

---

<div class="post-metadata">

### Author: ![sallypf](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sallypf](https://meta.discourse.org/u/sallypf)
#### Post date: [June 5, 2025, 4:19pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/8 "2025-06-05T16:19:29Z")

</div>

> [@supermathie](#):
>
> It’s probably set in your container configuration file, the default contents in the template are:

Finally we found it Yay! 🙂  
So how do we change it?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [June 5, 2025, 4:26pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/9 "2025-06-05T16:26:05Z")

</div>

> [@sallypf](#):
>
> So how do we change it?

Edit the file and change it.

---

<div class="post-metadata">

### Author: ![Andrew\_Rowe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrew_rowe/32/445877_2.png) [@Andrew\_Rowe](https://meta.discourse.org/u/Andrew_Rowe)
#### Post date: [June 5, 2025, 6:07pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/10 "2025-06-05T18:07:06Z")

</div>

from [link in post 2](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/2) above

If you change **just** SMTP settings, you can do just this to apply them without doing a full rebuild:

```plaintext
cd /var/discourse
./launcher destroy app
./launcher start app

```

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [July 5, 2025, 6:07pm UTC](https://meta.discourse.org/t/how-to-set-domain-value-in-email-server-settings/368902/11 "2025-07-05T18:07:39Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
