Gmail Is Bouncing Your App's Email? Here's How to Fix SPF, DKIM, and DMARC
How to set up SPF, DKIM, and DMARC for your sending domain

If your automated emails land in spam or bounce with a 550 5.7.26 error, your sending domain probably lacks proper authentication. This guide walks through setting up SPF, DKIM, and DMARC DNS records, explaining how each check reads a different domain and why alignment with your visible From address matters. It includes concrete examples for a subdomain like mail.example.com, with verification steps and common pitfalls like duplicate SPF records.
This explains the otherwise confusing result where SPF and DKIM both say “pass,” but DMARC says “fail.” The checks can succeed for the wrong domains.
- buredoranna
This looks like a pretty good resource.
I'd like to add the following, which I continually reference and has led to repeatable success:
https://www.linuxbabe.com/mail-server/setting-up-dkim-and-sp...
And as far as confirming it works, I continually rely on sending to a gmail address.
Under the three dots is "view original" which gives you
SPF, DKIM, and DMARC results.
(edit:formatting)
- jcul
This is a cool site to visualise your SPF, DKIM, DMARC setup interactively.
- gerdesj
This was not written by an email admin. Start with the real basics:
Your MTA should announce itself and DNS should agree. So your MTA says: HELO smtp.example.co.uk
smtp.example.co.uk will resolve to an A record (say a.b.c.d) and a reverse lookup will also work:
d.c.b.a.in-addr.arpa PTR smtp.example.co.uk.
Remember this is all about reputation, so if you also DNSSEC sign example.co.uk, then you will look like you care about your domain reputation.
Then do SPF, DKIM and DMARC. Note how the example for SPF stops at ~all and not -all. The rest is also superficial.
Anyway, I run email systems that do the job properly and it is not trivial and certainly not formulaic. There is no shortcut to getting an IP address/range trusted.
The advice on that page is ... good as far as it goes but woefully inadequate for running an email system. It's a good start.