# Wrong sending domain used

**URL:** <https://meta.discourse.org/t/wrong-sending-domain-used/43723>\
**Category:** Self-hosting\
**Created:** [May 5, 2016, 11:18am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723 "2016-05-05T11:18:24Z")\
**Posts on this page:** 13\
**Page:** 1

## AI-generated summary

The user [stadja](/t/-/43723/1) is experiencing issues with sending emails from their Discourse installation, specifically the account validation notification. The error message `[Sender] 550 5.7.1 Unconfigured Sending Domain <gmail.com>` is displayed when trying to send an email using the test button. 

[DeanMarkTaylor](/t/-/43723/2) suggests checking the notification email and reply by email address settings in the admin panel, which resolves the initial issue. However, the account validation notification emails are still not being sent.

[codinghorror](/t/-/43723/5) mentions that the sending domain must be validated with the email provider, but [stadja](/t/-/43723/6) confirms that the domain is already validated. [codinghorror](/t/-/43723/5) also notes that Bitnami installs are not supported, and recommends using a Docker-based install.

The discussion then shifts to the challenges of running Discourse alongside an existing Apache server, with [fefrei](/t/-/43723/7) and [stadja](/t/-/43723/8) exchanging comments on the complexity of setting up an outer nginx instance.

[Mittineague](/t/-/43723/9) clarifies that [stadja](/t/-/43723/8) is trying to use a Docker container, and [fefrei](/t/-/43723/11) provides instructions on manually configuring the `app.yml` file and setting up nginx to forward the subdomain for Discourse.

Ultimately, [stadja](/t/-/43723/12) decides to reinstall Discourse with an nginx setup, still unsure about the root cause of the email sending issues.

<div class="post-metadata">

**Author:** ![stadja](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@stadja](https://meta.discourse.org/u/stadja)\
**Post date:** [May 5, 2016, 11:18am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/1 "2016-05-05T11:18:24Z")

</div>

Hello guys,  
I know it’s a common problem,  
but I am searching everywhere and I can’t find any answer !!!

So here is the deal:

- I am running v1.6.0.beta1 +394
- My email configuration is:  
**address** [smtp.sparkpostmail.com](http://smtp.sparkpostmail.com)  
**port** 2525  
**domain** [ltn.io](http://ltn.io)  
**user\_name** SMTP\_Injection  
**authentication** plain  
**enable\_starttls\_auto** true
- when I try to send an email with the test button, all I have is:  
` [Sender] 550 5.7.1 Unconfigured Sending Domain <gmail.com>`

My **discourse.conf** is:

```
db_name = bitnami_discourse
db_host = /home/ltn/discourse/postgresql
db_port = 5432
db_pool = 25
hostname = "discourse.ltn.io"
db_username = ******
db_password = " *******"
redis_port = 6379
redis_path = ******

smtp_address = "smtp.sparkpostmail.com"
smtp_port = 2525
smtp_domain = 'ltn.io'
smtp_user_name = 'SMTP_Injection'
smtp_password = ' ******'
smtp_enable_start_tls = true
developer_email = " ***** @ltn.io"

```

Anyone can see a problem ? An explaination ? I have been trying to correct this for 2 days now !

Please help ? 🙂

---

<div class="post-metadata">

**Author:** ![DeanMarkTaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/deanmarktaylor/32/102462_2.png) [@DeanMarkTaylor](https://meta.discourse.org/u/DeanMarkTaylor)\
**Post date:** [May 5, 2016, 11:41am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/2 "2016-05-05T11:41:29Z")

</div>

Check the following settings in admin:

- notification email
- reply by email address

---

<div class="post-metadata">

**Author:** ![stadja](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@stadja](https://meta.discourse.org/u/stadja)\
**Post date:** [May 5, 2016, 11:49am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/3 "2016-05-05T11:49:44Z")

</div>

Thank you !  
You rock.

😻

It was the **notification email**.  
But _why ?_

---

<div class="post-metadata">

**Author:** ![stadja](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@stadja](https://meta.discourse.org/u/stadja)\
**Post date:** [May 5, 2016, 1:38pm UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/4 "2016-05-05T13:38:40Z")

</div>

Ok,  
so now my test email are working…  
but not my activation emails ?

I think they are simply not sent at all … I can’t find any trace of them anywhere.

---

<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:** [May 5, 2016, 8:48pm UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/5 "2016-05-05T20:48:08Z")

</div>

You must validate the domain

`discourse.example.com`

with your email provider. If you fail to validate that domain with your email provider you will have problems.

Also Bitnami installs are not supported here, only Docker based installs.

---

<div class="post-metadata">

**Author:** ![stadja](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@stadja](https://meta.discourse.org/u/stadja)\
**Post date:** [May 6, 2016, 5:57am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/6 "2016-05-06T05:57:04Z")

</div>

> [@codinghorror](#):
>
> Also Bitnami installs are not supported here, only Docker based installs.

Dude seriously ?  
I’m running v1.6.0.beta3 +12 from your github account, that should be sufficient no ?  
The docker version is kinda hard for me to run because I already have an apache running on my server and so I know it is possible but there are plenty of things to do to make it run. With the bitnami install, it’s one ./ctlscript start and it works.

Anyway, my sending domain is validated. Other emails are sent correctly, but not the account validation notification. So it’s not usable… I’m kinda sad about this.

But thanks for your good work, I’m following this project for a long time now and I really like what you did.

---

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [May 6, 2016, 8:04am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/7 "2016-05-06T08:04:40Z")

</div>

> [@stadja](#):
>
> The docker version is kinda hard for me to run because I already have an apache running on my server and so I know it is possible but there are plenty of things to do to make it run.

Yeah, [it’s super complicated](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247). Setting up the outer nginx instance takes _two_ commands in the shell, and you’d have to actually _copy and paste_ the configuration [from the tutorial](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247). You’d even have to change a line in you Apache config.

> [@stadja](#):
>
> Dude seriously ?

The :discourse: team is giving free support to open source users that aren’t paying them a dime. How careless of them to not support hard-to-debug unofficial installation methods, too…

---

<div class="post-metadata">

**Author:** ![stadja](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@stadja](https://meta.discourse.org/u/stadja)\
**Post date:** [May 6, 2016, 9:32am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/8 "2016-05-06T09:32:35Z")

</div>

> [@fefrei](#):
>
> Yeah, it’s super complicated. Setting up the outer nginx instance takes two commands in the shell, and you’d have to actually copy and paste the configuration from the tutorial. You’d even have to change a line in you Apache config.

Ok.

So:

- _ **This guide assumes you already have Discourse working** _ : Ok so how is it possible. Because I can’t have discourse working because I already have an apache server running. When I try to install it, I can’t because the answer is something like: Your port 80 is already occupied, you can’t install it. =\> So, no my Discourse is not already working, I can’t install it.
- Then, I want to use a docker container, in order NOT to install too many extra things on my production server. I don’t want to install an extra nginx server on my server
- Finally: why would you answer me like that and who do you think you are ?

> [@fefrei](#):
>
> How careless of them to not support hard-to-debug unofficial installation methods, too…

I never said they were careless nor anything, I am happy with their work, I am sad that it is not usable for me.

---

<div class="post-metadata">

**Author:** ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)\
**Post date:** [May 6, 2016, 10:09am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/9 "2016-05-06T10:09:10Z")

</div>

> [@stadja](#):
>
> I want to use a docker container

Ah, that wasn’t clear. I think the problem was seeing  
`db_name = bitnami_discourse`  
led others to think you were trying to do things your own way and then asking for help when you ran into problems.

Assuming you followed the Docker install  
[https://github.com/discourse/discourse\_docker](https://github.com/discourse/discourse_docker)  
it would be helpful if you explained where that failed.

---

<div class="post-metadata">

**Author:** ![stadja](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@stadja](https://meta.discourse.org/u/stadja)\
**Post date:** [May 6, 2016, 1:30pm UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/10 "2016-05-06T13:30:23Z")

</div>

Well when I used the docker, I directly had an error:

```
$ ./discourse-setup
Port 80 appears to already be in use.

If you are trying to run Discourse simultaneously with another web
server like Apache or nginx, you will need to bind to a different port

See https://meta.discourse.org/t/1724`

```

---

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [May 6, 2016, 2:22pm UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/11 "2016-05-06T14:22:09Z")

</div>

In that situation, you cannot use the `discourse-setup` script. Copy `app.yml` from `samples` to `containers` and fill in the values manually.  
[The tutorial](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247) includes changes to this file, which will ensure that Discourse can start up (listening on a socket).

After that, you can install nginx on your host and set it up to forward the subdomain for Discourse as explained in the tutorial. Your Apache installation will have to move to a different port so nginx can start up, and nginx will need some configuration to forward everything else to Apache as needed.

Any alternative using Apache directly as your front end HTTP server will have some performance issues because Apache deals poorly with long polling connections used by message bus.

---

<div class="post-metadata">

**Author:** ![stadja](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@stadja](https://meta.discourse.org/u/stadja)\
**Post date:** [May 11, 2016, 9:10am UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/12 "2016-05-11T09:10:44Z")

</div>

Thank you for your answer.

I must say that I really don’t understand what in my current installation doesn’t work for sending emails !  
I just received the “new version” notification by mail, with the good postmaster…  
but when someone try to connect, he doesn’t receive the email (the good admin options seem checked) =\> those email sending doesn’t even appears in /admin/email/sent (nor bounced, ignored or rejected).

Grmbl.

Thank you for you time I’ll try to reinstall it from the beginning with an nginx later 🙂

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [June 8, 2024, 12:45pm UTC](https://meta.discourse.org/t/wrong-sending-domain-used/43723/13 "2024-06-08T12:45:40Z")

</div>

Closed on June 8, 2024, 12:45pm UTC

This topic was automatically closed after 2956 days. New replies are no longer allowed.
