# Is docker hostname the same as the subdomain for email setup?

**URL:** https://meta.discourse.org/t/is-docker-hostname-the-same-as-the-subdomain-for-email-setup/48573
**Category:** Self-hosting
**Created:** [Août 12, 2016, 7:09 UTC](https://meta.discourse.org/t/is-docker-hostname-the-same-as-the-subdomain-for-email-setup/48573 "2016-08-12T19:09:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jacobpossibly](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jacobpossibly](https://meta.discourse.org/u/Jacobpossibly)
#### Post date: [Août 12, 2016, 7:09 UTC](https://meta.discourse.org/t/is-docker-hostname-the-same-as-the-subdomain-for-email-setup/48573/1 "2016-08-12T19:09:21Z")

</div>

Hi im wondering if im supposed to use the discourse hostname i put in app.yml to setup my mailgun account.  
is it the same or are they supposed to be different sub domains?

I’m using cloudflare for dns and mailgun for email, ive enabled the cf template but cant seems to get the dns to verify or send any emails

can anyone give me a general outline of a good setup to use?

not sure to use [mail.domain.com](http://mail.domain.com), [email.domain.com](http://email.domain.com), [post.domain.com](http://post.domain.com), discourse,[domain.com](http://domain.com) etc…

---

<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: [Août 12, 2016, 8:11 UTC](https://meta.discourse.org/t/is-docker-hostname-the-same-as-the-subdomain-for-email-setup/48573/2 "2016-08-12T20:11:44Z")

</div>

Mail should be from `forum.example.com` so you should enter it that way. This is what mailgun recommends, and is also what the Discourse default setup assumes.

---

<div class="post-metadata">

### Author: ![Jacobpossibly](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@Jacobpossibly](https://meta.discourse.org/u/Jacobpossibly)
#### Post date: [Août 12, 2016, 8:22 UTC](https://meta.discourse.org/t/is-docker-hostname-the-same-as-the-subdomain-for-email-setup/48573/3 "2016-08-12T20:22:27Z")

</div>

so the hostname of discourse and email subdomain are the same? thx

---

<div class="post-metadata">

### Author: ![fishb6nes](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fishb6nes/32/121291_2.png) [@fishb6nes](https://meta.discourse.org/u/fishb6nes)
#### Post date: [Janvier 8, 2017, 9:14 UTC](https://meta.discourse.org/t/is-docker-hostname-the-same-as-the-subdomain-for-email-setup/48573/4 "2017-01-08T21:14:31Z")

</div>

Changing the domain on my docker instance after the initial installation doesn’t change the domain used for emails. Is this a feature or bug? What if I’d like to send emails from [domain.com](http://domain.com) rather than [discourse.domain.com](http://discourse.domain.com).
