# What sets the domain in the Email Settings?

**URL:** https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784
**Category:** Self-hosting
**Tags:** unsupported-install
**Created:** [February 22, 2019, 1:48am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784 "2019-02-22T01:48:34Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![MicahZoltu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/micahzoltu/32/120780_2.png) [@MicahZoltu](https://meta.discourse.org/u/MicahZoltu)
#### Post date: [February 22, 2019, 1:48am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/1 "2019-02-22T01:48:34Z")

</div>

I recently setup Discourse and everything seems to be working. However, when I look at Admin \> Emails \> Settings \> domain, it says “[example.com](http://example.com)”. I can’t find anywhere in the settings or mailgun that references “[example.com](http://example.com)”.

Where is “[example.com](http://example.com)” coming from? How can I change it?

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/a/cab0bb9e730c49b21764fe3c4c3accabbdef8f29.png)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 22, 2019, 2:13am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/2 "2019-02-22T02:13:05Z")

</div>

It’s in app.yml that was created when you ran discourse-setup. You can run it again to change it.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [February 22, 2019, 4:30am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/3 "2019-02-22T04:30:49Z")

</div>

I don’t think domain parameter appears with mailgun  
Or am I mistaken here?

 ![chrome](https://global.discourse-cdn.com/meta/original/3X/6/b/6b6e1fc1afcb2b0490992d989acdb4624bcb45ae.png)

---

<div class="post-metadata">

### Author: ![MicahZoltu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/micahzoltu/32/120780_2.png) [@MicahZoltu](https://meta.discourse.org/u/MicahZoltu)
#### Post date: [February 24, 2019, 2:16am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/4 "2019-02-24T02:16:05Z")

</div>

So this cannot be set via the UI anywhere? What exactly does it do? Everything _appears_ to be working correctly, and I’m not sure what I should set it to. Should I set it to [mailgun.org](http://mailgun.org), or to [mail.my-domain.com](http://mail.my-domain.com), or to [my-domain.com](http://my-domain.com)?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 24, 2019, 2:28am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/5 "2019-02-24T02:28:44Z")

</div>

That is odd I don’t see that domain setting in my Discourse installs either under Admin, Email. How did you install this? Did you folllow our [official install](https://meta.discourse.org/t/142537?silent=true) guide?

---

<div class="post-metadata">

### Author: ![MicahZoltu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/micahzoltu/32/120780_2.png) [@MicahZoltu](https://meta.discourse.org/u/MicahZoltu)
#### Post date: [February 24, 2019, 2:45am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/6 "2019-02-24T02:45:16Z")

</div>

I did not follow the [official install](https://meta.discourse.org/t/142537?silent=true) guide, I used the bitnami docker images and compose file (for reasons argued at length elsewhere).

Your comment suggests to me that that section of the UI will just show anything that ends up in the configuration file prefixed with `smtp_`? If so, then it sounds like the solution here is to talk to Bitnami about deleting it, since apparently it isn’t a setting Discourse wants/uses/needs?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 24, 2019, 4:34am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/7 "2019-02-24T04:34:32Z")

</div>

Yes. If you need help with the bitnami install you’ll need to get it from them.

---

<div class="post-metadata">

### Author: ![MicahZoltu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/micahzoltu/32/120780_2.png) [@MicahZoltu](https://meta.discourse.org/u/MicahZoltu)
#### Post date: [February 24, 2019, 4:50am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/8 "2019-02-24T04:50:50Z")

</div>

I don’t need help with my installation (from people here), I just need help understanding where the UI is pulling that variable from (IIUC, it is from configuration files on disk), how I can change it in the UI (IIUC, I cannot), and what that setting does/means (IIUC, it does nothing).

My default assumption when looking at a settings UI is that it will only include settings that are actually used by the system. However, IIUC, Discourse will simply list _any_ setting that it finds in configuration files, whether that settings is used or not. In this case, my install ended up with an extraneous setting that isn’t used and the UI blindly presented it to me (not unreasonable, just unexpected).

Please correct me if I’m wrong about any of the above. If all of the above is correct, I can seek help elsewhere in getting that configuration setting removed from my installation.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [February 24, 2019, 7:21am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/9 "2019-02-24T07:21:54Z")

</div>

Consider yourself corrected, because we don’t support installations from third party packages, hence the #unsupported-install tag on this topic.

You cite _reasons argued elsewhere_, and you’re entitled to use a third party package if you believe they know better than the _developers_, but the cost is that you’re not going to receive any assistance here whatsoever.

OTOH you’re welcome to reinstall in a supported method, migrate your data and re-test. If the issue somehow presents itself again then we might be able to assist, but for now this is something you need to take up with your package maintainer.

---

<div class="post-metadata">

### Author: ![MicahZoltu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/micahzoltu/32/120780_2.png) [@MicahZoltu](https://meta.discourse.org/u/MicahZoltu)
#### Post date: [February 24, 2019, 7:46am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/10 "2019-02-24T07:46:41Z")

</div>

Are you saying that if I don’t follow the supported install procedure I will not get an answer here to questions like, “How do I create new categories?” Information on how to use the Discourse UI feels like a reasonable request regardless of how I installed the software. Saying, “unsupported, we refuse to talk to you until you install the supported way” feels petty (struggling to find an appropriate word here, petty is the closest I could get).

In this case, I’m not asking for help fixing my install, or even help figuring out how I got into this situation. I’m trying to understand what a UI element means, where the data backing that UI element is sourced from, and how to interpret the UI element.

I could simply lie to you and say, “I reinstalled via a supported method and edited my conf file to include `smtp_domain` and it shows up in the UI at this location, does that do anything?” but I would rather not and just be honest with how I got into the position I am now in.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 24, 2019, 9:35am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/11 "2019-02-24T09:35:27Z")

</div>

> [@MicahZoltu](#):
>
> Information on how to use the Discord UI

This is not Discord so you are in the wrong place.

---

<div class="post-metadata">

### Author: ![MicahZoltu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/micahzoltu/32/120780_2.png) [@MicahZoltu](https://meta.discourse.org/u/MicahZoltu)
#### Post date: [February 24, 2019, 9:38am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/12 "2019-02-24T09:38:41Z")

</div>

Was a typo, fixed now.

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [February 24, 2019, 11:58am UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/13 "2019-02-24T11:58:02Z")

</div>

Your Question was regarding email not regarding categories.

Get Your questions aligned with your argument before making unnecessary commentary about your grudges.

If you install from an unsupported method and lie about it, we need certain diagnostic information, You’re caught of cheating red-handed so don’t even think that You’ll be pared for doing that kind of thing.

And about the “we refuse to talk” thing,  
It’s not possible for people here to support things that we don’t know about. That’s why we chose to remain silent so that someone who knows can help and we are not adding to unnecessary conversation where we absolutely don’t have to.

I hope this clears all your doubts. If You install using the official guide and are still greeted with issues, we’re here helping people every single day and more than community the core team is eager to fix the real issues (not some arbitrary questions that occurred because you installed a version of discourse that isn’t supported).

---

<div class="post-metadata">

### Author: ![MicahZoltu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/micahzoltu/32/120780_2.png) [@MicahZoltu](https://meta.discourse.org/u/MicahZoltu)
#### Post date: [February 24, 2019, 12:11pm UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/14 "2019-02-24T12:11:54Z")

</div>

To rephrase my question to hopefully make it more clear why this is not a “help me troubleshoot my install” issue:

How does Discourse populate the list of settings in the view that I included as a screenshot in the OP? Does it blindly list any setting in the conf file that starts with `smtp`, or does it have an internal list of valid settings that it will present to the user?

Does it fetch these from the configuration file at application startup every time, or do they get mirrored to the backing DB and then pulled from there after the first run?

Is there any mechanism in the UI to edit these settings (either in the configuration file or in the DB, depending on where they are actually read from at runtime), or do I have to do it by hand?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 24, 2019, 12:32pm UTC](https://meta.discourse.org/t/what-sets-the-domain-in-the-email-settings/109784/15 "2019-02-24T12:32:03Z")

</div>

If you do a [standard install](https://meta.discourse.org/t/142537?silent=true), email settings are in app.yml.
