Back to BlogAI & Automation

SPF, DKIM, DMARC in 30 Minutes: Before You Burn Your Company's Domain

This article provides a step-by-step guide to configuring SPF, DKIM, and DMARC records to significantly enhance email security and deliverability, preventing phishing and improving domain reputation.

Roman LedakUpdated 7 min read
SPF, DKIM, DMARC in 30 Minutes: Before You Burn Your Company's Domain

Your domain's email security is likely less robust than it could be, a common scenario we encounter at AGAPE. Many businesses, after migrating to platforms like Microsoft 365, often neglect to update their email authentication records. This oversight leaves them vulnerable, despite having well-prepared outbound campaigns and validated contact lists.

The Critical Need for Email Authentication

Statistics show that 91% of cyberattacks originate from phishing emails, highlighting the necessity of robust email security, not just basic "email settings." Implementing a DMARC policy alone can reduce phishing attempts impersonating a domain by approximately 90%, as documented by Warmforge. Major providers like Google and Yahoo now mandate at least a DMARC p=none policy for bulk senders, with a clear push towards p=quarantine and p=reject. Microsoft explicitly states that emails without proper authentication may be entirely rejected, as per their Defender for Office 365 documentation.

Lack of a published DMARC record causes providers to treat all correspondence from a domain as suspicious. Common errors, such as multiple SPF records or leaving a +all mechanism, allow any server worldwide to send emails on your domain's behalf, leading to technical chaos.

Cost of Inaction vs. Cost of Action

Rebuilding a damaged domain reputation can take weeks, halting your entire outbound pipeline. This cost far outweighs the 30-60 minutes required to configure a few DNS records. Each day of delay means lost sales opportunities, as campaigns cannot run effectively until the domain is properly authenticated.

SPF, DKIM, and DMARC: Three Layers of Protection

SPF (Sender Policy Framework)

SPF is a list of authorized servers allowed to send email on behalf of your domain. An SPF record, a TXT record starting with v=spf1, must include mechanisms for email providers (e.g., include:spf.protection.outlook.com for Microsoft 365 or include:_spf.google.com for Google Workspace) and your own server IPs. It should end with an all mechanism, initially set to ~all for testing. Crucially, exceeding a strict limit of 10 DNS lookups will cause receiving servers to automatically fail SPF checks.

DKIM (DomainKeys Identified Mail)

DKIM is a cryptographic signature that verifies a message hasn't been altered in transit. Microsoft 365 requires two CNAME records (e.g., selector1._domainkey and selector2._domainkey). Google Workspace generates one TXT record with a public key. Keys should be 2048 bits long and rotated every few months for optimal security.

DMARC (Domain-based Message Authentication, Reporting, & Conformance)

DMARC is an overarching policy that leverages SPF and DKIM results to check domain alignment. It verifies that the From header domain matches the domain authenticated by SPF or DKIM. This alignment check often causes issues with emails from external systems where DKIM is signed by the tool provider's domain, not yours. The adkim and aspf parameters determine relaxed (r) or strict (s) alignment. Starting with r is recommended for environments with multiple third-party senders, as s can block emails from subdomains and external platforms.

Secure Audit Path in Five Minutes

Tools like MXToolbox, HitMe.pl, and Animails can audit your domain's SPF, DKIM, and DMARC status using public DNS data. Simply enter your domain name to quickly see if you have more than one SPF record, if +all is enabled, if DKIM keys are at least 1024 bits, and if a DMARC policy is published.

Implementation Checklist: 30 Minutes to a Secure Domain

Minutes 0-5: Inventory Sending Sources

Before making any DNS changes, list all systems that send emails on behalf of your domain. This includes your primary mail server (Google Workspace or Microsoft 365), CRM, marketing automation, invoicing, transactional emails, website forms, cold email tools, and ticketing systems. Missing even one legitimate source can lead to its blocking by SPF and DMARC (e.g., invoices ending up in spam with a p=quarantine policy).

Minutes 5-15: SPF and the 10 DNS Lookup Limit

  1. Back up your current TXT records.
  2. Verify there is only one SPF record.
  3. Ensure the all mechanism is set to ~all.
  4. Add missing include mechanisms for providers and IP addresses identified in your inventory.
  5. After changes, send a test email and check the header for spf=pass.

Minutes 15-25: DKIM

  1. For Microsoft 365, add the two CNAME records (selector1._domainkey and selector2._domainkey) in your DNS panel and enable signing in the security portal.
  2. For Google Workspace, publish the TXT record with the public key (p=) generated by Google. Ensure the key is at least 1024 bits, ideally 2048 bits.
  3. Enable DKIM in your provider's console and verify the header shows dkim=pass.

Minutes 25-30: DMARC p=none

  1. Create a TXT record for _dmarc.yourdomain.com with v=DMARC1, rua=mailto:reports@yourdomain.com, pct=100, adkim=r, and aspf=r.
  2. The p=none policy acts in observation mode and won't affect deliverability.
  3. After analyzing reports for several days or weeks, transition to p=quarantine, and eventually p=reject.

Why DMARC Before SPF and DKIM Harms Deliverability

Enabling DMARC before correctly configuring SPF and DKIM actively harms deliverability. The policy will enforce rules on messages that haven't yet passed authentication, leading to rejection. Always ensure SPF and DKIM are properly set up first.

Protecting Your Main Domain for Cold Email

To protect your corporate domain, use secondary domains for cold email campaigns, typically with 2-3 mailboxes per domain and a sending limit of about 40 emails per day per account. Sending 10,000 cold emails monthly safely requires several additional domains. Microsoft recommends separating marketing communication (e.g., m.domain.com) from transactional emails (e.g., t.domain.com) using subdomains to prevent high spam rates from damaging your main domain's reputation.

Dedicated vs. Shared IP

A dedicated IP offers greater control over reputation, but its effectiveness depends entirely on list quality and recipient engagement. A shared IP leverages the reputation of a pool of senders, and for low volumes, can be advantageous if well-managed by the provider. However, a dedicated IP alone won't solve deliverability issues if your domain is poorly authenticated or generates many spam complaints; fundamental DNS records are key.

Email Warm-up and List Hygiene

Email warm-up tools generate synthetic positive signals (opens, replies) within a controlled network of mailboxes. When combined with correct SPF, DKIM, and DMARC, they build the reputation of a new domain. Maintaining list hygiene—using double opt-in, visible unsubscribe links, and regularly removing inactive addresses—is crucial for a low spam rate.

What to Do if Deliverability Drops After Changes

  1. Analyze the Authentication-Results header in a test email.
  2. Identify failed mechanisms:
    • If spf=fail, check if your new SPF record covers all sources.
    • If dkim=fail, verify the key's consistency between the signing server and your published DNS record.
    • If dmarc=fail despite passing SPF or DKIM, the problem is domain alignment.
  3. Temporarily revert the DMARC policy to p=none as a safety measure. All three mechanisms are DNS records, so changes are reversible within propagation times (minutes to hours).

Email Forwarding and ARC

Email forwarding can break SPF, as the intermediary server sends mail from an IP not listed in your SPF record. This can cause legitimate forwarded emails to fail SPF checks, leading to rejection with a p=reject DMARC policy. Yahoo recommends implementing ARC (Authenticated Received Chain) in forwarding environments to preserve original authentication information. DKIM signatures generally pass forwarding, making DKIM more critical for alignment survival.

30-Minute Checklist Summary

  • Step Zero: Back up existing TXT records.
  • Step One: Audit your domain using MXToolbox, HitMe.pl, and Animails.
  • Step Two: Inventory all email sending sources.
  • Step Three: Verify and correct your SPF record, ensuring it adheres to the 10 DNS lookup limit.
  • Step Four: Add DKIM records generated by Microsoft 365 or Google Workspace.
  • Step Five: Implement a DMARC record with p=none, rua, and pct=100.

After these changes, send test emails to Gmail, Yahoo, and Outlook accounts, and check headers for pass values for SPF, DKIM, and DMARC.

This article was created with AGAPE's proprietary content machine AGAPE Liberty.

Frequently asked questions

Email authentication is vital because 91% of cyberattacks originate from phishing emails. Robust SPF, DKIM, and DMARC configurations prevent impersonation, improve email deliverability, and satisfy mandates from major providers like Google and Microsoft, who may reject unauthenticated emails.

Ready to evaluate fit?

Book a 25-minute discovery call and let's see if AGAPE is the right partner for your next campaign.

Schedule a 25-minute discovery call

You might also like

EU AI Act Article 50 explained: what changed for B2B outbound on 2 August 2026
AI & Automation

EU AI Act Article 50 explained: what changed for B2B outbound on 2 August 2026

EU AI Act Article 50 mandates transparency and content labeling for AI-driven B2B outbound. Learn how to maintain high-velocity automated pipeline growth while remaining fully compliant.

November 25, 20267 min read
Read
EU AI Act Article 50: which outbound steps now require AI disclosure
AI & Automation

EU AI Act Article 50: which outbound steps now require AI disclosure

Article 50 of the EU AI Act is in force from 2 August 2026, covering chatbots, synthetic content and automated outbound text. Here is a step-by-step map of which touchpoints in your sales process now need clear AI disclosure.

October 26, 202619 min read
Read
Zero-Hallucination Architecture: AI Without Brand Risk
AI & Automation

Zero-Hallucination Architecture: AI Without Brand Risk

Zero-Hallucination architecture enables safe B2B outreach automation. By separating layers, AI generates content without the risk of hallucinations and factual errors, protecting the company's reputation.

September 21, 20264 min read
Read
Questions Instead of Presentations: How to Run the Second Meeting with a Decision-Maker
Sales

Questions Instead of Presentations: How to Run the Second Meeting with a Decision-Maker

Pitching slides on your second sales call stalls deals. Discover how replacing presentations with targeted verification questions eliminates no-decision losses and protects B2B margins.

December 4, 20268 min read
Read
Articles at 3.61% CTR, carousels at 0.99%: what our September data says about formats
Strategy

Articles at 3.61% CTR, carousels at 0.99%: what our September data says about formats

AGAPE's September distribution data shows technical articles achieving a 3.61% CTR compared to 0.99% for carousels, delivering over three times higher engagement with significantly lower production overhead.

December 2, 20265 min read
Read
How to structure an article so ChatGPT and Perplexity cite it by name
AEO

How to structure an article so ChatGPT and Perplexity cite it by name

Stop AI engines from scraping your intellectual property without credit. Learn how to structure B2B technical articles so ChatGPT and Perplexity cite your domain by name.

November 30, 20269 min read
Read