Discourse setup on official Digital Ocean droplet not producing emails

AI-generated summary

jordan-violet is experiencing issues with their Discourse setup on Digital Ocean, where emails are not being sent out for the violetfamily.com domain. The setup for jordanviolet.dev was successful. After fixing an initial email error by allowing non-secure applications, the issue persisted with only one email being sent. The logs show a 200 OK status, but emails are not being received.

jordan-violet notes that after a period of inactivity, an email was received with an expired confirmation link, suggesting possible issues with the SMTP relay.

jordan-violet mentions that Google will be deprecating less secure apps, which may affect email setup in the future, and plans to research OAuth setup guides for Discourse.

jordan-violet discovers that disabling and reenabling the MX servers resolves the issue, although the exact reason is unclear.

I’m using the officially supported installation of Discourse through the official Digital Ocean droplet. I set one site up successfully (jordanviolet.dev) and currently setting up a second site (violetfamily.com).

  • Domain is through Google Domains, but nameservers are on Digital Ocean
  • Both are using their respective domain emails, which are Google Workspace accounts (so @jordanviolet.dev and @violetfamily.com, respectively)
  • Both have 110% identity configurations on Google Workspace, domains, etc. I have checked what feels like two dozen times.

jordanviolet.dev setup great and sent the emails out!

violetfamily.com had an email error, I fixed that by allowing non-secure applications per this guide (which worked for jordanviolet.dev):

It sent out one email, but the registration expired and it hasn’t sent out an email since, though it seems to be getting 200 OK in the logs when I run tail -f shared/standalone/log/rails/production.log and then send the email out—I get this:

Started HEAD "/" for 13.57.1.58 at 2024-05-18 18:39:43 +0000
Processing by FinishInstallationController#index as */*
  Rendered finish_installation/index.html.erb within layouts/finish_installation (Duration: 0.9ms | Allocations: 187)
  Rendered layout layouts/finish_installation.html.erb (Duration: 23.7ms | Allocations: 2771)
Completed 200 OK in 61ms (Views: 25.3ms | ActiveRecord: 0.0ms | Allocations: 8607)
Started GET "/" for 13.57.1.58 at 2024-05-18 18:39:43 +0000
Processing by FinishInstallationController#index as */*
  Rendered finish_installation/index.html.erb within layouts/finish_installation (Duration: 0.6ms | Allocations: 187)
  Rendered layout layouts/finish_installation.html.erb (Duration: 9.4ms | Allocations: 2575)
Completed 200 OK in 14ms (Views: 10.5ms | ActiveRecord: 0.0ms | Allocations: 3736)

I receive no emails. Any suggestions? I feel I’ve exhausted my options at the moment.

EDIT:

After sitting still for a while and not making changes, one oddly came through but with a timestamp of about 10 minutes old (and also then the link to confirm my email was expired).

I wonder if something is just stuck in the smtp relay somewhere, and I just need to wait it out.

It seems that Google will soon be deprecating less secure apps from being possible with their platform for email:

Will have to do some research to see if there are any Discourse guides currently for setting up a new install with Google email using OAuth.

For anyone else who comes across this, what finally worked for me (though not understandably so):

Disabling and reenabling my MX servers seems to have done the trick.