Email failure after install

I have installed Discourse and now have admin access but when I try send invitations or test emails, total failure.

I have an email server ( with the account After reading several of the support questions and answers it appears may require SPF and DKIM DNS records. Did I miss this in the installation instructions?

I found and tested the SPF record and that appears okay.
I can send email from my personal email to postmaster@mydomain and it is received okay.

If I send a test email from my Discourse, it is not received. Is a DKIM required? If so, how do I install the DKIM? Again, did I miss this step somewhere?


1 Like

SPF and DKIM shouldn’t be preventing outgoing mail from going from Discourse to your mail server. Check the /logs on your forum and the logs of the mail server for any error messages.


Any documentation of those would come from your email provider, as there’s no one way to set them up. But as noted, it’s extremely unlikely that this is the cause of your delivery failures.


Thanks to all. Sorry for the delay. It seems that outgoing email tests land in a black hole. I now understand that SPF and DKIM records should not be required. Here is what I now see when logged in as admin:

/emails/settings I enter any (mine or an invited user; host domain or not) email address and I get this error msg:

There was a problem sending the test email. Please double-check your mail settings, verify that your host is not blocking mail connections, and try again.

As I understand the email settings in Discourse, I think they are correct but I have seen no real definition. Host domain is not blocking because I can send an email from my personal address. I checked UFW of Discourse droplet and it reports disabled.

/logs/error logs is blank. An obvious error (above) but it didn’t log! Log all email processing failures to [/logs] is true (checked). I find no error at host domain.

In addition, I have a WP site with WP Discourse plugin installed but not activated. Might this plugin help somehow?


I returned to Dashboard and saw this:

There are 7 email jobs that failed. Check your app.yml and ensure that the mail server settings are correct. [See the failed jobs in Sidekiq](

I clicked Sidekiq and I see 7 entries which are duplicates of these"

[in 3 hours]( 15 [default]( Jobs::InviteEmail {"invite_id"=>2, "current_site_id"=>"default"} Jobs::HandledExceptionWrapper: Wrapped Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)>

[in 3 hours]( 15 [critical]( Jobs::CriticalUserEmail {"type"=>"email_login", "user_id"=>1, "email_token"=>"da467ec8590f0ecb0220d3aed5b33c61", "current_site_id"=>"default"} Jobs::HandledExceptionWrapper: Wrapped Net::ReadTimeout: Net::ReadTimeout with #<TCPSocket:(closed)>

That admin dashboard page also says “You’re up to date!” but when I ssh into the droplet, I’m told that “55 packages can be updated.” Does this require some action?

1 Like

Orthogonal issues. The admin dashboard tells you that Discourse itself is up to date. The message on login to the droplet tells you that there’s system software that can be updated. You should probably investigate how to set up automated updates for this system.

This sounds like your Discourse instance isn’t able to connect to the specified mail server on the specified port. Make sure your configuration is correct, and that DO doesn’t block outbound connections on the port you’re trying to use.


discourse/ at 35e153d84f77351143742149a3fad1e8de9b2b6b · discourse/discourse · GitHub

In Ubuntu use the dpkg-reconfigure -plow unattended-upgrades command.


Suggestions, in logical order of execution:

  1. Verify that your droplet can connect to the mail server via telnet
  2. Verify that the SMTP credentials are functioning independent of the droplet

If 1 fails then you have a network issue, DigitalOcean has been known to block certain outbound ports, and this is the issue 85% of the time.

If both 1 and 2 works then check your app.yml, it’s likely the password either includes a character which is preventing it from being parsed properly (~5% of the time), or you didn’t enter it correctly.

Re the mail server, if you’re hosting a mail server rather than using one of the recommended mail providers then SPF and DKIM can definitely help with deliverability, but you’re likely to be at the tip of the iceberg in terms of mail problems.


Thanks to all for the assistance.
I think the problem was my email server provided by GoDaddy. I never did identify the cause of problem. It seems that GoDaddy has a lot of issues with shared accounts. Ultimately, I decided it wasn’t worth the hassle and searched for recommended email providers and selected I opened a mailjet free account and edited app.yml, accordingly. Some additional mailjet config was required. Again, tried the Discourse email test: success. My Discourse community is small so there should be no problem with limited free emails by mailjet. All looks good at this point but I can see there is stilll a lot of configuration ahead.
Thanks again…


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.