← ip-tracker.eu
Email Security Guide

Email Security: SPF, DKIM & DMARC

8 min read  ·  How DNS-based email security protects your domain from spoofing

Last updated: September 24, 2026  ·  Maintained by the IP-Tracker.eu team

// Why Email Security Records Matter

Email was designed in the 1970s with no authentication mechanism — anyone can send an email claiming to be from any address. This makes email spoofing trivially easy: a criminal can send messages appearing to come from your-bank.com, your-company.com, or even a government agency.

Three DNS-based standards were created to combat this: SPF, DKIM, and DMARC. Together they form a chain of trust that allows receiving mail servers to verify whether an email truly came from the domain it claims to represent.

Without these records, your domain is vulnerable to being used in phishing campaigns — and your legitimate emails may be marked as spam. Major email providers (Gmail, Microsoft 365, Yahoo) increasingly require DMARC to deliver to the inbox reliably.

// SPF — Sender Policy Framework

SPF is a DNS TXT record that lists which mail servers are authorised to send email on behalf of your domain. When a receiving server gets an email claiming to be from example.com, it checks example.com's SPF record to see if the sending server's IP is listed.

How SPF Works

  1. You receive an email from user@example.com
  2. Your mail server looks up the SPF record for example.com
  3. It checks whether the sending server's IP address is in the SPF record
  4. If yes → SPF PASS. If no → SPF FAIL (may be rejected or marked as spam)

Reading an SPF Record

v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.5 -all
PartMeaning
v=spf1SPF version (always spf1)
include:_spf.google.comAllow all IPs in Google's SPF record (for Gmail)
include:sendgrid.netAllow SendGrid to send on your behalf
ip4:203.0.113.5Allow this specific IPv4 address
-allHard fail — reject all other senders

SPF Qualifiers

QualifierResultRecommendation
-allHard fail — rejectBest for enforced domains
~allSoft fail — accept but markTransition / testing
?allNeutral — no policyAvoid
+allPass — allow everyoneNever use
💡 SPF only checks the envelope sender (MAIL FROM), not the visible From: header. That's why SPF alone is not enough — DMARC adds the alignment check.

// DKIM — DomainKeys Identified Mail

DKIM adds a cryptographic signature to every outgoing email. The receiving server can verify this signature using a public key published in the sending domain's DNS. If the signature is valid, the email content hasn't been tampered with in transit and it was sent by an authorised server.

How DKIM Works

  1. Your mail server signs outgoing emails with a private key
  2. A DKIM-Signature header is added to the email
  3. The receiving server fetches your public key from DNS: selector._domainkey.example.com
  4. It uses the public key to verify the signature
  5. If valid → DKIM PASS (the email wasn't altered and came from an authorised source)

DKIM DNS Record

default._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."

The selector (here: default) allows a domain to have multiple DKIM keys — useful for different sending services. Google uses google, SendGrid uses its own selector, etc.

💡 Unlike SPF, DKIM survives email forwarding. The signature travels with the email and can be verified at any point. This is why DKIM is more reliable than SPF for forwarded messages.

// DMARC — Domain-based Message Authentication

DMARC ties SPF and DKIM together and adds a policy for what to do with emails that fail authentication. It also enables reporting — you receive reports from other mail servers about who is sending email using your domain.

DMARC Alignment

DMARC requires that either SPF or DKIM must align with the From: header domain. This closes the gap that SPF alone leaves — an attacker could pass SPF with a different domain, but DMARC checks that the authenticated domain matches the visible From: address.

Reading a DMARC Record

_dmarc.example.com TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; ruf=mailto:forensic@example.com; pct=100; adkim=s; aspf=s"
TagMeaning
v=DMARC1DMARC version
p=rejectPolicy: reject failing emails (quarantine = spam folder; none = no action)
rua=mailto:...Aggregate reports sent here (daily XML summary)
ruf=mailto:...Forensic reports sent here (per-failure details)
pct=100Apply policy to 100% of failing emails
adkim=sDKIM alignment: strict (domain must exactly match)
aspf=sSPF alignment: strict

DMARC Policy Progression

  1. Start with p=none — monitor only, collect reports, no email blocked
  2. Move to p=quarantine — failing emails go to spam
  3. Enforce p=reject — failing emails are rejected outright

// How the Three Work Together

Think of them as three layers of protection:

An attacker trying to spoof your domain would need to either have access to your DKIM private key, or be listed in your SPF record, or compromise your mail server — all of which are significantly harder than simply forging a From: address.

// Check Your Domain's Email Security

You can inspect SPF and DMARC records for any domain using ip-tracker.eu — enter the domain name and check the Email Security section for SPF and DMARC status.

From the command line:

dig TXT example.com                 # SPF record
dig TXT _dmarc.example.com            # DMARC record
dig TXT default._domainkey.example.com # DKIM public key

Common issues to look for:

// Checking Email Security in Practice

A domain lookup in IP-Tracker.eu retrieves live TXT records and highlights SPF and DMARC when they are present. This makes it possible to quickly verify whether the domain publishes basic sender authentication policies.

When reviewing the result, check whether an SPF record exists and whether the domain publishes a DMARC policy under _dmarc.example.com. The presence of records alone does not guarantee a secure configuration — the policy and permitted senders also matter.

If you manage a domain, compare the live SPF and DMARC values shown by IP-Tracker.eu with the records configured at your DNS provider after making changes.

Check any domain's SPF & DMARC records

Instant DNS lookup including email security status — free, no registration.

Check Domain Security →

// Related Articles