GMail delivery problems: is subdomain discourse.ourdomain.org strictly necessary in outgoing mails?

AI-generated summary

A user luas reports Gmail delivery issues for their Discourse instance, likely due to missing DKIM for discourse.ourdomain.org, while only ourdomain.org is properly signed. They considered switching to Google login but realized it wouldn’t solve email delivery. After not receiving guidance on whether the subdomain is strictly necessary, they changed the sender to discourse@ourdomain.org, which resolved the issue. tobiaseigen suggests reviewing email troubleshooting steps and possibly switching to a better email provider, acknowledging email setup complexity. Thomas_Rother confirms that proper SPF, DKIM, and DMARC configurations are mandatory for deliverability, and recommends using a relay service like duocircle.com if local setup is too complex. The consensus implies that while subdomain-based senders (e.g., noreply@discourse.ourdomain.org) are common, they are not strictly required — using a top-level domain sender (discourse@ourdomain.org) can work if properly configured and authenticated. luas confirms this workaround successfully delivers emails to Gmail users.

I started running a Discourse instance in December 2024, and we’re one of those quite some that have trouble with GMail.
Users trying to create an account with a GMail address will never receive an email from our instance. No, also not in spam folder. I extensively read meta.discourse and understand that the probable reason is that we don’t have a valid DKIM signature for discourse.ourdomain.org, only for ourdomain.org.

I tried with Discourse Another SMTP - #10 by Monikas, but didn’t get it working and never got a reply on how to exactly configure it.

On searching again, I started configuring Configure Google login for Discourse, but then realized that these users will still never receive emails from us, it would only help them authenticate.

As I don’t feel competent to configure DKIM and stuff for our discourse subdomain, I wonder if it would be an issue to send mails from discourse@ourdomain.org instead of noreply@discourse.ourdomain.org. Or is there any strong argument for including this subdomain in outgoing e-mails?

Thanks in advance!

How did you set up outbound email for your site? Seems to me you need to consider switching to a new, better provider.

Email is hard, as we all know, so you have my full sympathy! :hugs:

I recommend you work your way through the email troubleshooting steps. Please report back here and let us know how you get on!

I had similar issues years ago. Unfortunately not all providers understand the requirements for secure e-mail delivery:

  1. proper setup of Sender Policy Framework (SPF) in your domains DNS settings
  2. proper DKIM signing of each mail (e.g. with OpenDKIM)
  3. setup of DMARC as a backup if SPF and DKIM fail

These functions are mandatory and must be implementend either on your local mail-server or on the relaying mail server of your provider. Otherwise your outgoing mail will be blocked. For example by gmail.com - but also by most others.

In my case I use an external service (duocircle.com) as a relay, for both incoming mail (including spam protection) and outgoing mail (smtp).

Thanks for your replies! As I didn’t receive feedback on whether the subdomain would be necessary, I switched to discourse@ourdomain.org as sender address. This works perfectly.