Create a unified, global setting for sender address


(Pekka Gaiser) #1

I’m having trouble getting a locally hosted Discourse install to work because I can’t get the activation E-Mail for the admin account. However, this post isn’t about my particular problem but about an aspect of Discourse that needs to be improved.

I’m using an SMTP server with a shared hosting company to dispatch the messages and, as said, can’t get it to work.

I worked through the troubleshooting guide and managed to reach the point where launcher mailtest works - but only because I could tell the hosting provider’s SMTP server to accept * sender addresses, something that is not at all common in the world of shared hosting.

Also, I’m still not getting any activation E-Mails! This is likely because Discourse is using yet another sender address for its regular messages, one that I can’t debug using launcher mailtest and that probably points to the local domain where the forum runs (which isn’t any good for the SMTP server either.)

I realize that address can be changed by calling

rails r "SiteSetting.notification_email = ''"

and I’ve done that, but I don’t know any way to check whether it actually worked, and the sending still doesn’t work.

I know my next step has to be going through the mail server logs, but my point is that this “multiple arbitrary sender addresses” business is more complicated than necessary and should be simplified.

Can we have one unified official “sender address” setting that

  • applies to both launcher mailtest and the regular sending of messages

  • comes pre-configured / commented out in the default app.xml file so people can find it?


For active or crate a admin acount :
Frist login in your ssh

1 :

cd /var/discourse

2 :

./launcher enter app


./launcher ssh app

3 :

 rake admin:create

Q : Do you want to grant Admin privileges to this account? (Y/n).
A : for new acount : Enter

if your admin acount existe :

rake admin:create

Q : User with this email already exists! Do you want to reset the password for this email? (Y/n)
A : for new acount : Y
and enter your new password

and for email snder setting use
and edite youe app.yml

Edite this line in your app.yml

TODO: The mailserver this Discourse instance will use

DISCOURSE_SMTP_PORT: 587 # (optional)
DISCOURSE_SMTP_PASSWORD: your app password # (optional)

(Jeff Atwood) #3

Are you installing an old version somehow? If you are on current supported Docker install for v1.3 beta, the return mail address is set at install time to the domain you specify in app.yml. It is never any more.

(Pekka Gaiser) #4

It’s a fresh install. The domain as sender address doesn’t work for my setup, because it is a local one that the external SMTP server doesn’t accept as valid. I need to explicitly configure it to something completely different.

(Jeff Atwood) #5

That is kind of a bizarre situation. Your site’s domain, the one you specified your discourse is at, is not valid according to your mailserver?

Why would you be sending mail for from a different address, e.g.

(Pekka Gaiser) #6

I would think it’s a pretty common occurence for a company internal forum? The Discourse server is on the local network, but the company doesn’t have a local mailserver I can use, so I have to talk to the external one to send mails.