implementing-dmarc-dkim-spf-email-security

SPF, DKIM, and DMARC form the three pillars of email authentication. Together they prevent domain spoofing, validate message integrity, and define policies for handling unauthenticated mail. Proper im

Works with

Claude CodeCursorClineWindsurfCodexGooseGitHub CopilotZed

0

total installs

0

this week

8.6K

GitHub stars

0

upvotes

Install Skill

Run in your terminal

$npx skills install mukul975/Anthropic-Cybersecurity-Skills/implementing-dmarc-dkim-spf-email-security

0

installs

0

this week

8.6K

stars

Installation Guide

How to use implementing-dmarc-dkim-spf-email-security on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your machine
  • Node.js 16+ with npm — verify with node --version
  • Active project directory where you want to add implementing-dmarc-dkim-spf-email-security
2

Run the install command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills install mukul975/Anthropic-Cybersecurity-Skills/implementing-dmarc-dkim-spf-email-security

Fetches implementing-dmarc-dkim-spf-email-security from mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI shows a list of agents. Use arrow keys and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ────────────────
│ · Cline · Codex · Goose · Windsurf
│ ●Cursor(selected)
│ · Cursor · Aider · Continue
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/implementing-dmarc-dkim-spf-email-security

Restart Cursor to activate implementing-dmarc-dkim-spf-email-security. Access via /implementing-dmarc-dkim-spf-email-security in your agent's command palette.

Security Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.

Documentation

name
implementing-dmarc-dkim-spf-email-security
description
SPF, DKIM, and DMARC form the three pillars of email authentication. Together they prevent domain spoofing, validate message integrity, and define policies for handling unauthenticated mail. Proper im
domain
cybersecurity
subdomain
phishing-defense
tags
- phishing - email-security - social-engineering - dmarc - awareness - dkim - spf - dns
version
'1.0'
author
mahipal
license
Apache-2.0
nist_csf
- PR.AT-01 - DE.CM-09 - RS.CO-02 - DE.AE-02

Implementing DMARC, DKIM, and SPF Email Security

Overview

SPF, DKIM, and DMARC form the three pillars of email authentication. Together they prevent domain spoofing, validate message integrity, and define policies for handling unauthenticated mail. Proper implementation drastically reduces phishing attacks that impersonate your organization's domain.

When to Use

  • When deploying or configuring implementing dmarc dkim spf email security capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • DNS management access for your domain
  • Access to email server/MTA configuration (Postfix, Exchange, Google Workspace, Microsoft 365)
  • Basic understanding of DNS TXT records
  • Python 3.8+ for validation scripts

Key Concepts

SPF (Sender Policy Framework)

Publishes a DNS TXT record listing authorized IP addresses and mail servers that can send email on behalf of your domain. Receiving servers check the envelope sender's IP against this list.

DKIM (DomainKeys Identified Mail)

Adds a cryptographic signature to outgoing emails using a private key. The corresponding public key is published in DNS. Receivers verify the signature to ensure the message was not altered in transit.

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

Builds on SPF and DKIM by specifying a policy (none/quarantine/reject) for messages that fail authentication, and provides a reporting mechanism to monitor spoofing attempts.

Workflow

Step 1: Audit Current State

# Check existing SPF record
dig TXT example.com | grep spf

# Check existing DKIM selector
dig TXT selector1._domainkey.example.com

# Check existing DMARC record
dig TXT _dmarc.example.com

Step 2: Implement SPF

# DNS TXT record for example.com
v=spf1 ip4:203.0.113.0/24 include:_spf.google.com include:spf.protection.outlook.com -all

Key SPF mechanisms:

  • ip4: / ip6: - Authorize specific IP ranges
  • include: - Include another domain's SPF record
  • a - Authorize domain's A record IPs
  • mx - Authorize domain's MX record IPs
  • -all - Hard fail all others (recommended)
  • ~all - Soft fail (monitoring phase)

Step 3: Implement DKIM

# Generate DKIM key pair (2048-bit RSA)
openssl genrsa -out dkim_private.pem 2048
openssl rsa -in dkim_private.pem -pubout -out dkim_public.pem

# Format public key for DNS (remove headers, join lines)
grep -v "PUBLIC KEY" dkim_public.pem | tr -d '\n'

DNS TXT record at selector1._domainkey.example.com:

v=DKIM1; k=rsa; p=MIIBIjANBgkqhki...

Step 4: Implement DMARC

# DNS TXT record at _dmarc.example.com
# Phase 1 (Monitor):
v=DMARC1; p=none; rua=mailto:[email protected]; ruf=mailto:[email protected]; pct=100

# Phase 2 (Quarantine):
v=DMARC1; p=quarantine; rua=mailto:[email protected]; pct=25

# Phase 3 (Reject):
v=DMARC1; p=reject; rua=mailto:[email protected]; pct=100

Step 5: Monitor and Analyze DMARC Reports

Use the scripts/process.py to parse DMARC aggregate XML reports and identify authentication failures, unauthorized senders, and spoofing attempts.

Tools & Resources

Validation

  • SPF record passes validation at mxtoolbox.com
  • DKIM signature verified on test emails
  • DMARC record properly formatted and reporting enabled
  • Test emails pass all three checks in recipient's Authentication-Results header

List & Monetize Your Skill

Submit your Claude Code skill and start earning

Get started →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Steps

  1. 1Install skill using provided installation command
  2. 2Test with simple use case relevant to your work
  3. 3Evaluate output quality and relevance
  4. 4Iterate on prompts to improve results
  5. 5Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use when

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid when

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Related Skills

Reviews

4.542 reviews
  • G
    Ganesh MohaneDec 28, 2024

    implementing-dmarc-dkim-spf-email-security has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • K
    Kaira LiuDec 28, 2024

    I recommend implementing-dmarc-dkim-spf-email-security for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • L
    Liam NasserDec 20, 2024

    Keeps context tight: implementing-dmarc-dkim-spf-email-security is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • K
    Kabir DesaiDec 12, 2024

    Useful defaults in implementing-dmarc-dkim-spf-email-security — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • R
    Rahul SantraNov 19, 2024

    Keeps context tight: implementing-dmarc-dkim-spf-email-security is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • D
    Diego BrownNov 19, 2024

    Useful defaults in implementing-dmarc-dkim-spf-email-security — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • K
    Kabir GillNov 11, 2024

    implementing-dmarc-dkim-spf-email-security has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • H
    Henry JainNov 7, 2024

    Keeps context tight: implementing-dmarc-dkim-spf-email-security is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • K
    Kabir ThompsonNov 3, 2024

    I recommend implementing-dmarc-dkim-spf-email-security for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • C
    Chinedu WhiteOct 26, 2024

    We added implementing-dmarc-dkim-spf-email-security from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

showing 1-10 of 42

1 / 5

Discussion

Comments — not star reviews
  • No comments yet — start the thread.