Guide
Email Security and Deliverability: A Practical Guide
Whether an email is trusted, filtered as spam, or rejected outright is decided by a handful of DNS records and a few lines of header text. The same records that help an honest sender reach the inbox are what let a receiver catch a forged one.
This guide walks through that system in the order a message experiences it, from the sender's DNS to the headers in your mail app, and points to the article or tool that goes deeper at each step. It is written for people who run a domain, people who test email, and anyone who wants to check a suspicious message properly.
The journey of one email
A message leaves the sender's mail server, which looks up the recipient domain's MX records to find out where to deliver it. The receiving server accepts the connection, runs its checks, and either delivers, files as spam, or rejects. Everything the receiver concluded is written into new header lines at the top of the message.
Our walkthrough of what happens to an email after it is sent to a tempboxs address follows one real pipeline end to end: MX routing to Cloudflare, size and rate checks, HTML sanitizing, storage and expiry.
The DNS records that decide where mail goes and who may send it
Four record types matter for email. MX says which servers accept mail for a domain. SPF, published as a TXT record, lists the servers allowed to send for it. DKIM publishes a public key at a selector name such as selector1._domainkey.example.com so receivers can verify signatures. DMARC, a TXT record at _dmarc, tells receivers what to do when a message fails and where to send reports.
DNS record types explained covers the syntax of each, including A, CNAME, NS and CAA. To see what a domain actually publishes right now, use the DNS lookup tool: it queries a public resolver from your browser and has a DKIM option that takes the selector.
- A domain must have only one SPF record. Two records make SPF fail with a permanent error.
- SPF evaluation may trigger at most ten further DNS lookups. Each include: counts, and the limit is easy to exceed after adding a few services.
- DKIM selectors are chosen by the mail provider, so you need the s= value from a real message to look one up.
How receivers authenticate a message
SPF checks the envelope sender, the Return-Path address used for bounces, against the sending server's IP. It does not look at the From address you see. DKIM verifies a signature made by whichever domain is named in the d= tag, which may also differ from the From address.
DMARC is what ties these to the address you see. It passes only when SPF or DKIM passes for a domain that aligns with the From domain. Relaxed alignment, the default, accepts a subdomain of the same organisational domain; strict alignment requires an exact match.
Paste a message's headers into the email header analyzer to see the spf=, dkim= and dmarc= results your provider recorded, and whether the Reply-To and Return-Path domains match the From domain. SPF, DKIM and DMARC explained works through real pass and fail examples.
Reading the evidence in the headers
Every server that handles a message adds a Received line to the top, so the chain reads bottom-up from the sender. Only the lines added by servers you trust, normally your own provider's, are reliable. Anything below them was written by the sender and can be invented.
How to read email headers for phishing clues explains where to find the full headers in Gmail, Outlook and Apple Mail, which lines can be forged, and what a passing result does not prove.
What authentication cannot catch
Authentication answers one question: did this message really come from the domain it names? It says nothing about whether that domain is the one you think it is. A phishing email from a look-alike domain the attacker registered can pass SPF, DKIM and DMARC perfectly. So can a message sent from a genuine account that has been taken over.
That is why visual and contextual checks still matter: urgency, a changed payment detail, a link whose real destination differs from its text. How to spot phishing emails lists them, and why cybersecurity starts with your inbox explains why email is the account attackers most want.
- Check the domain in the From address character by character, not just the display name.
- Hover over links, or paste them into the URL cleaner, to see the real destination before you click.
- Treat any request to change bank details or reset a password as something to verify through a separate channel.
Tracking inside legitimate mail
Much legitimate marketing mail is instrumented. A remote 1×1 image reports when and roughly where a message was opened; wrapped links report each click. Neither is malicious, but both are worth knowing about when you decide which address to give out.
Our guide to email tracking pixels explains what they reveal and how mail apps' image proxies change that. The email tracking pixel checker finds them in any email's HTML.
Deliverability for senders and testers
Since February 2024, Gmail and Yahoo require anyone sending in bulk to their users to authenticate with SPF and DKIM, publish a DMARC policy (p=none is enough to start), offer one-click unsubscribe, and keep the spam-complaint rate low. Smaller senders are held to SPF or DKIM at minimum. If you send product email from a domain, these records are no longer optional.
Testing is where many teams damage their own reputation. Automated tests that send to real colleagues' addresses, or to invented addresses that bounce, raise complaint and bounce rates on the same domain your customers' mail comes from. Why QA scripts shouldn't use real email addresses covers the mechanics.
For manual checks, a temporary inbox for QA testing receives a signup or reset email without involving anyone's real mailbox. The developer testing toolkit covers the rest of the workflow.
A 10-minute check of your own domain
- Look up MX for your domain in the DNS lookup tool and confirm it points at your mail provider.
- Look up TXT and confirm there is exactly one record starting v=spf1, and that it includes every service that sends as you.
- Send yourself a message from each service, open the source, and note the DKIM s= selector. Look up DKIM with that selector to confirm the key is published.
- Look up DMARC. If nothing is published, start with p=none and a rua= reporting address, then move to quarantine once reports look clean.
- Paste the headers of one of those test messages into the email header analyzer and confirm spf, dkim and dmarc all show pass.
- Optionally, look up CAA to see which certificate authorities may issue certificates for the domain.
Frequently asked questions
If you send email from your own domain, yes. SPF and DKIM authenticate the message and DMARC tells receivers how to treat failures. Gmail and Yahoo require all three from bulk senders, and receivers trust mail with them more than mail without.
The usual causes are a missing or broken SPF record (often two records, or more than ten lookups), DKIM not enabled for one of the services that send as you, no DMARC record, or a poor sending reputation from complaints and bounces. Check each record with a DNS lookup and confirm a test message passes all three in its headers.
Yes. DMARC only proves the message is authenticated for the domain in its From address. If the attacker owns a look-alike domain and sets up SPF, DKIM and DMARC for it, their mail passes. Always check the domain itself.
Use a DNS lookup tool. Query MX for mail servers, TXT for SPF, DMARC for the _dmarc policy, and DKIM with the selector taken from the s= tag of a message's DKIM-Signature header.