Not receiving Activation Email


#1

Hello Discourse community,

This is a continuation from this thread: Attempting to install Discourse on private Apache Server

Well, I have installed Ubuntu 16.04 from scratch (this time without Apache) and have successfully gotten the “Congratulations, you installed Discourse!” screen. When I go to register the Admin account, and click Register, I’m told that I’m supposed to receive a confirmation email … and I haven’t received one. What am I doing wrong?

So, this is currently how I have my discourse-setup:
Hostname: epoch-nexus.net
Email: admin@epochgames.co.uk
SMTP address: smtp.sparkpostmail.com
SMTP port: 465
SMTP username: SMTP_Injection
SMTP password: [My_generated_API-Key_from_Sparkmail]

In the past, I also tried setting up admin@epochgames.co.uk as the SMTP username, but I realize that this email address can’t be used for SMTP:
Hostname: epoch-nexus.net
Email: admin@epochgames.co.uk
SMTP address: cloud18.unlimitedwebhosting.co.uk
SMTP port: 465
SMTP username: admin@epochgames.co.uk
SMTP password: [admin@epochgames.co.uk_password]

epoch-nexus.net is the hostname of the machine to host Discourse. That admin email address is an email address created on our team’s hosting site (cloud18.unlimitedwebhosting.co.uk is the provider), and I’m trying to use Sparmail as mentioned in this link:

discourse/INSTALL-email.md at master · discourse/discourse · GitHub

I’ve set up the SMTP address and username as per the link, and created an API Key on Sparkpost. Also on Sparkpost, I set up the Sending Domain as “epoch-nexus.net” (or should epochgames.co.uk be the Sending Domain?).

As you can probably tell, I’m not interested in using DigitalOcean hosting (as mentioned, I’d like to host Discourse on my own dedicated Ubuntu machine I’m creating for Discourse). I’ve been told before that DigitalOcean hosting isn’t necessary, and that this guide can mostly be followed for home setup: discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub

So, what am I doing wrong? What should I do next? I really don’t understand how I need to setup email.


(Jeff Atwood) #2

Follow the email troubleshooting #howto topic first. Step by step.


#3

Thank you for the link. Here’s my progress so far:
I’ve found that I was using the wrong port for Sparkpost: I should have been using 587. Here’s the new configuration:

Hostname: epoch-nexus.net
Email: admin@epochgames.co.uk
SMTP address: smtp.sparkpostmail.com
SMTP port: 587
SMTP username: SMTP_Injection
SMTP password: [My_generated_API-Key_from_Sparkmail]

However, even after rebuilding with this port, still not receiving any emails. I’ve gone into the production log (less shared/standalone/log/rails/production.log), and found the following:

Sent mail to admin@epochgames.co.uk (60183.3ms)
Job exception: Net::ReadTimeout

Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)

Why am I getting ReadTimeouts? And what is Redis?

And what are DKIM and SPF records? The site linked in the troubleshooting guide is information on using them for Mandrill. Do I need to use DKIM or SPF? And how would I set them up for Sparkport?

And how do I find out if the email domain I set is correct?

Sorry for so many questions. I’m trying to follow the troubleshooting guide, but it doesn’t give very detailed instructions in certain sections.


(Jeff Atwood) #4

Your Discourse install is broken. Did you follow the official setup guide exactly, step by step, with no deviation?


#5

I’ve followed the instructions from the step involving “Install Docker / Git”. I don’t want to install Discourse on a Cloud Server: I want to install Discourse on a home Ubuntu machine of mine. I wish there was Discourse instructions for installing Discourse on a home system, but I’ve only ever been directed to the Cloud one:

Is there another “official setup guide”?


(Owen Sullivan) #6

No there is only the one. Actually, I installed my first Discourse forum today, and when trying to use Sparkpost nothing worked. Also, sparkpost was flagged as spam. I suggest using mailgun or sendgrid (I’m currently using sendgrid and it works fine).


(Mittineague) #7

I followed this to install Discourse in a VM with Ubuntu
It works, but I don’t do email with it so YMMV


#8

Well that stinks that Sendgrid isn’t completely free. I wish I could just use my current web domain where we already have emails set up, as opposed to paying another site.

Maybe Mailjet will work (that one is completely free)? I suppose it’s worth a try.


#9

Thank you for that link, that looks really helpful! So it’s a fully working Discourse forum, just doesn’t send out emails?

If I did this set up, can I still have people outside my local network register accounts and post on Discourse? But then don’t I need email functionality in order for Discourse to send out activation emails?


(Owen Sullivan) #10

If you are a student you can signup for GitHub for Education, which gives you a free sendgrid account. That’s how I did it. You can check it out and apply here (if you are a student).

Otherwise the issue with the development installation is that its meant only for plugin development and such - anyone who tries to sign up will not be able to because they will not receive an activation email. But, you could do that and activate each account manually.

Mailjet should work fine if it’s free.


(Felix Freiberger) #11

As long as you already have a way to deliver mails via SMTP from the server hosting Discourse, this should work fine – a commercial mail provider is simply recommended because they tend to give better deliverability with less work.

And yes, please don’t use a development install for production use, that’s not supported for good reasons. However, you should be able to follow the Docker-based install on any modern Linux host that supports Docker :slight_smile:


(Mittineague) #12

It could be that it is possible to have it do email stuff.
It does have mailcatcher.
It’s that I use it only to test various Core and plugin code, and emails are not part of my testing.

To create new accounts I register using a fake email address
eg. TestUser3 testuser3@localhost.com
and then as Admin go to the users page and activate the account.


(Matt Palmer) #13

Remember:

The “cloud” install instructions will work on any machine that is capable of running Docker, and has sufficient resources (diskspace, RAM, etc). They’re called “cloud” install instructions because that’s where most people are going to use them, “in the cloud”. Which is just someone’s else’s computer.


#14

Alright guys, I got the Activation Email (used SparkPost Mail with this guide I found: Using SparkPost with Discourse - SparkPost), and now Discourse is fully installed on my localhost!

What’s the issue now? Getting it to point to the local internet so others on my team can join Discourse (something I haven’t done before). Is there a recommended program for an Ubuntu user like myself? I’m afraid to install Apache, as it will likely overwrite my Discourse install on localhost as it’s done before.

Now maybe I need to rebuild Discourse, as currently for Hostname I put the exact localhost hostname in app.yml, as opposed to an alternative (like “discourse.[localhost_name]”), which may interfere with other necessary networking software?
Or I suppose I might need to do something with Docker? Docker seems to be installed correctly as I receive a Hello message when I run “sudo docker run hello-world” as per this guide: Choose Docker CE or Docker EE on Ubuntu | Docker Documentation

Should I open a new thread for this?


#15

Silly me! I just needed to port forward 80 of my machine’s local IP. It’s all working now. However, I’m finding problems with the invite email URL containing my hostname as opposed to my IP Address, but I’ll open a new thread for that.

This thread can be locked.


(Jeff Atwood) #16