Skip to content

Email Deliverability

David Cook edited this page Apr 14, 2024 · 2 revisions

Email Deliverability is the art of ensuring emails sent by our systems land on users' Inbox and not on spam filters or spam folders.

On top of configuring your instance to send emails, there are a few things you need to do to ensure appropriate deliverability of the emails send.

SPF record

SPF is a DNS record on your dns register that lists the domains and IPs authorized to send email on behalf of your main domain. IF you use sendgrid or google to send the emails from OFN you will need to add the respective SPF records.

  • For gmail, follow this guide and add something like: v=spf1 include:_spf.google.com ~all.
  • For sendgrid, follow this guide and add something like this: v=spf1 include:sendgrid.net ~all

DMARC record

A dmarc record is dns record like this Host: _dmarc Value: v=DMARC1; p=none; rua=mailto:tech@openfoodfoundation.org; ruf=mailto:tech@openfoodfoundation.org; fo=1

Email providers will send DMARC reports to these email addresses.

If these email addresses are on a different domain of the domain you are configuring (for example, this above is the openfoodnetwork.org.au dmarc record and the email is tech@openfoodfoundation.org), you need a DNS record on openfoodfoundation.org authorizing this: Host: openfoodnetwork.org.au._report._dmarc Value: v=DMARC1

DKIM

DKIM setup will also depend on email provider. For google you can follow this guide For sendgrid this is the guide to follow

DMARC report analysis

After all this is setup you can go to the email address you setup for dmarc and have a look at the reports. These reports will tell you if the email sent from your domain are good in terms of spf and dkim auth. You can use a dmarc report analyser to parse the xml reports: https://mxtoolbox.com/DmarcReportAnalyzer.aspx

Verify your setup

You can use https://mxtoolbox.com/ and https://toolbox.googleapps.com/apps/checkmx/ to see how your are doing.