MST2
April 25, 2019, 10:03pm
1
So, I have installed Discourse and I am having issues with the email.
I‘m using SparkPost and followed this guide.
Now I used the troubleshoot guide, and at the part where you‘re supposed to check the discourse logs is where I‘m at right now. I looked at them and found this:
Now, I understand this as an email was sent but something is not known or failed?
Could someone help me?
Stephen
(Stephen)
April 25, 2019, 10:17pm
2
Where did you install Discourse?
Is DNS working correctly? Can you resolve the mail server address from the server?
MST2
April 25, 2019, 10:19pm
3
I installed discord on a cloud server.
What exactly do you mean with can you resolve the mail server address from the server ?
Stephen
(Stephen)
April 25, 2019, 10:20pm
4
I mean can you use PING or NSLOOKUP to resolve the address you entered during discourse-setup
for sparkpost?
Did you follow the standard install guide ? How did you install Discourse onto the server?
MST2
April 25, 2019, 10:26pm
5
The STMP address from SparkPost?
I did everything like in the guide. I installed it with docker.
Stephen
(Stephen)
April 25, 2019, 10:31pm
6
The address of the SMTP server, which is a DNS name, not the SMTP address sparkpost is using, which would be in the format user@realm.com
Stephen
(Stephen)
April 25, 2019, 10:37pm
8
So
SSH into your server and do this:
ping smtp.sparkpostmail.com
Also, if you:
cat /var/discourse/containers/app.yml | grep "smtp.sparkpostmail.com"
What’s the response?
If you don’t get back a line like this:
DISCOURSE_SMTP_ADDRESS: smtp.sparkpostmail.com
It’s very likely that you typo’d the address during discourse-setup, which would explain why your server can’t resolve it. You can re-run discourse-setup or edit the app.yml to correct it.
2 Likes
MST2
April 25, 2019, 10:43pm
9
Since there is no response from this:
It means this:
Right?
Stephen
(Stephen)
April 25, 2019, 10:46pm
10
If you’re SSH’d into the Discourse server and Discourse is installed in that path then yes.
You can check what’s in that line by doing this:
cat /var/discourse/containers/app.yml | grep "DISCOURSE_SMTP_ADDRESS:"
It should return something, if it doesn’t then there’s something more fundamental that’s awry with your setup.
MST2
April 25, 2019, 10:48pm
12
Oh I see it now, I wrote stmp even though it‘s smtp.
1 Like
Stephen
(Stephen)
April 25, 2019, 10:51pm
13
Yep, so you transposed two characters, which led to an invalid mail server address. DNS resolution failed and gave you the original error.
You can:
re-run discourse-setup
if you would prefer a prompt-driven process
edit it by hand using vi
or nano
Use this to automatically substitute it for you:
sed -i 's/stmp.sparkpostmail.com/smtp.sparkpostmail.com/g' /var/discourse/containers/app.yml
MST2
April 25, 2019, 10:52pm
14
Thanks for your help! I‘ll set it up the correct way now and I‘ll post in here again if it still does not work.
2 Likes
Stephen
(Stephen)
April 25, 2019, 10:53pm
15
Good luck, it should be plain sailing from here, let us know if not.
2 Likes