Here’s how you configure your domain to properly send email when you’re hosted here on the www.discourse.org servers. Lucky you!
Both of these changes must take effect on your domain name. So if your Discourse instance is at community.mydomain.com, add these settings at your DNS registrar for mydomain.com.
DKIM
Create a TXT record for discourse._domainkey
with the following value:
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCojtk3fqF69pT6SZcIwoYzjQfdOBTFK7AOyxEGBwHLZ+xqwQQlVgfL6xFZ7FhCYAczkGTCjdChX/qf6dg4LrtXrb+apymj9WpLOwPir6P5Mv9FH3t3BgrQeyyCLhAHqDrUk+kU3B2z1uva3oWw3qN9MLZaX8HjR13w9ywVEgzjpQIDAQAB
SPF
-
If you don’t yet have an SPF record, you’ll want to add one for your domain, of type TXT
v=spf1 include:_hostedspf.discourse.org ?all
-
If you already have SPF records, you’ll need to modify them by adding Discourse’s servers before the last operator, which is usually
?all
,~all
, or-all
:include:_hostedspf.discourse.org
make sure the “all” part is at the end.
The two new TXT records in your DNS, once entered, should look something like this (example from CloudFlare)
Once this is done make sure you set notification email
in your site settings to an email address from your domain.
Source: https://meta.discourse.org/t/configure-your-domain-for-discourse-hosted-email/14177