DMARC setup to prevent email spoofing and phishing

Table of Contents

  1. What is DMARC and Why It Matters
  2. SPF, DKIM, and DMARC: How They Work Together
  3. DMARC DNS Record Structure
  4. Policy Levels: none, quarantine, reject
  5. Step-by-Step DMARC Setup
  6. Understanding DMARC Reports
  7. DMARC for Subdomains
  8. Common Mistakes and How to Fix Them
  9. Verifying Your DMARC Configuration
  10. Frequently Asked Questions

What is DMARC and Why It Matters

DMARC stands for Domain-based Message Authentication, Reporting & Conformance. It is an international email authentication standard that allows domain owners to specify what should happen to emails claiming to be from their domain when they fail authentication checks.

Email spoofing is when an attacker sends emails with a forged sender address (From header) that appears to come from a trusted domain — such as [email protected] — even though they have no authority over that domain. DMARC gives receiving mail servers a way to detect and reject such forged emails.

Why DMARC matters more than ever in 2026: Google and Yahoo now require bulk email senders to have a DMARC policy in place. In 2026, major email providers worldwide have further tightened authentication enforcement, making DMARC essential for domain reputation and deliverability.

SPF, DKIM, and DMARC: How They Work Together

To understand DMARC, you need to know the basics of SPF and DKIM first:

StandardFunctionDNS RecordWhat It Verifies
SPFLists authorized IP addresses for sending emailTXT (v=spf1...)Mail server IP address
DKIMAdds a cryptographic signature to emailsTXT (selector._domainkey)Digital signature validity
DMARCDefines policy and receives reportsTXT (_dmarc)Alignment + Policy enforcement

DMARC does not replace SPF or DKIM — it builds on them. DMARC checks alignment: whether the domain in the From header matches the domain that passed SPF or DKIM authentication.

DMARC DNS Record Structure

A DMARC record is a TXT record created at the _dmarc subdomain of your domain. For example:

_dmarc.yourcompany.com  TXT  "v=DMARC1; p=none; rua=mailto:[email protected]; fo=1"

Explanation of each tag:

TagMeaningExample Value
vVersion (required)DMARC1
pPolicy for the root domain (required)none / quarantine / reject
spPolicy for subdomainsnone / quarantine / reject
ruaAddress for aggregate reportsmailto:[email protected]
rufAddress for forensic reportsmailto:[email protected]
pctPercentage of emails to apply policy to100 (default)
adkimDKIM alignment moder (relaxed) / s (strict)
aspfSPF alignment moder (relaxed) / s (strict)
foFailure reporting options0 / 1 / d / s

Policy Levels: none, quarantine, reject

The p= value is the heart of DMARC. There are 3 levels:

1 p=none — Monitor Mode

Emails that fail DMARC are still delivered normally, but you receive reports. Ideal for beginners or initial testing — use it to collect data before increasing enforcement.

2 p=quarantine — Quarantine Mode

Emails that fail DMARC are sent to the spam/junk folder instead of the inbox. Suitable when 70-80% confident that SPF and DKIM are correctly configured for all legitimate senders.

3 p=reject — Full Rejection

Emails that fail DMARC are rejected outright. Senders receive a bounce-back message. Use when 100% confident that all legitimate email passes authentication.

Step-by-Step DMARC Setup

1 Verify Your SPF Record Exists

dig TXT yourdomain.com | grep spf

Expected result: "v=spf1 include:mail.yourdomain.com ~all"

2 Verify Your DKIM Record Exists

dig TXT default._domainkey.yourdomain.com

For AsiaGB Hosting users (DirectAdmin): DKIM is automatically configured when email hosting is activated.

3 Create Your DMARC Record

In your domain's DNS manager, create a TXT record:

FieldValue
TypeTXT
Host/Name_dmarc
Valuev=DMARC1; p=none; rua=mailto:[email protected]
TTL3600

4 Wait for DNS Propagation (24-48 hours)

After creating the record, DNS propagation typically takes 1-24 hours to complete globally.

5 Review Reports and Increase Policy

After collecting reports for 2-4 weeks, analyze whether any legitimate emails are failing. Then gradually increase to quarantine → reject.

Understanding DMARC Reports

DMARC generates two types of reports:

TypeTagFrequencyContent
Aggregate Reportrua=DailyStatistical summary of SPF/DKIM pass/fail results
Forensic Reportruf=Per failureCopy of individual failing emails (not all providers send these)

Reports arrive as XML files. Recommended tools to parse and visualize them:

DMARC for Subdomains

To set a different policy for subdomains, use the sp= tag:

"v=DMARC1; p=reject; sp=quarantine; rua=mailto:[email protected]"

In this example, the root domain uses reject while all subdomains use quarantine — useful when some subdomains haven't had DKIM configured yet.

Tip: If you use multiple subdomains for email (newsletters, transactional), verify that each subdomain has its own SPF/DKIM records before enabling strict policies.

Common Mistakes and How to Fix Them

MistakeCauseFix
DMARC set but spam still gets throughUsing p=none (monitor mode only)Switch to p=quarantine or p=reject
Legitimate emails getting rejectedSPF/DKIM doesn't cover all email servicesCheck aggregate reports and add missing SPF includes
Not receiving DMARC reportsInvalid rua= address or full mailboxVerify destination email and DNS syntax
Invalid DMARC recordWhitespace or syntax errorUse MXToolbox DMARC checker
Alignment failing despite SPF passMail From domain ≠ From header domainUse aspf=r (relaxed) or fix Mail From address

Verifying Your DMARC Configuration

dig TXT _dmarc.yourdomain.com

# Expected output:
_dmarc.yourdomain.com. 3600 IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]"

Or use online tools:

Summary: The recommended progression is p=none (2-4 weeks) → p=quarantine pct=25 → pct=100 → p=reject. Gradually increase enforcement to avoid accidentally blocking legitimate email.

Frequently Asked Questions

What is DMARC?
DMARC (Domain-based Message Authentication, Reporting & Conformance) is an email authentication standard that prevents domain spoofing by working with SPF and DKIM to control what happens to emails that fail authentication checks.
What is the difference between SPF, DKIM, and DMARC?
SPF verifies the sending IP is authorized for your domain. DKIM adds a cryptographic digital signature to emails. DMARC builds on both by defining a policy for what to do when SPF or DKIM fails, and delivers reports to the domain owner.
What is the difference between none, quarantine, and reject?
none = monitor only, no action taken on failing emails; quarantine = suspicious emails go to the spam folder; reject = failing emails are completely rejected. Start with none to collect data, then tighten gradually.
Will DMARC break my email delivery?
With p=none, DMARC has absolutely no effect on email delivery. Only quarantine and reject policies affect delivery, and only for emails that fail authentication — not your legitimate emails that pass SPF/DKIM.
How do I read DMARC reports?
Set rua= in your DMARC record to receive aggregate reports by email. Reports arrive as XML — use tools like MXToolbox DMARC Analyzer or dmarcanalyzer.com to parse them into a readable dashboard.
Do I need SPF and DKIM before setting up DMARC?
Yes. Both SPF and DKIM must be correctly configured before enabling DMARC, because DMARC relies on their results to make decisions. Without them, all emails will fail DMARC immediately, potentially blocking all your mail.