email-deliverability
$
npx mdskill add mkurman/zorai/email-deliverabilityAuthenticate emails and protect sender reputation instantly.
- Diagnoses spam traps and fixes inbox placement failures.
- Configures SPF, DKIM, DMARC, and DNS TXT records.
- Plans IP warm-up and manages bounce handling strategies.
- Outputs actionable hardening steps for email infrastructure.
SKILL.md
.github/skills/email-deliverabilityView on GitHub ↗
--- name: email-deliverability version: 0.1.0 description: > Use this skill when optimizing email deliverability, sender reputation, or authentication. Triggers on SPF record setup, DKIM signing configuration, DMARC policy deployment, IP warm-up planning, bounce handling strategy, sender reputation monitoring, inbox placement troubleshooting, email infrastructure hardening, DNS TXT record configuration for email, and diagnosing why emails land in spam. Acts as a senior email infrastructure advisor for engineers and marketers managing transactional or marketing email. tags: [email, deliverability, spf, dkim, dmarc, reputation, devops, strategy, marketing] category: communication recommended_skills: [email-marketing, absolute-seo, privacy-compliance] platforms: - claude-code - gemini-cli - openai-codex - mcp license: MIT maintainers: - github: maddhruv --- ## Key principles 1. **Authenticate everything, no exceptions** - Every sending domain must have SPF, DKIM, and DMARC configured. Missing any one of these is enough for major mailbox providers (Gmail, Outlook) to treat your mail as suspicious. Authentication is table stakes, not a nice-to-have. 2. **Reputation is earned slowly and lost instantly** - Sender reputation is built over weeks of consistent, low-complaint sending. A single spam trap hit or complaint spike can tank your reputation overnight. Treat every send decision as a reputation decision. 3. **Bounces are signals, not noise** - Every bounce carries information about your list health, infrastructure, or content. Hard bounces must be removed immediately. Soft bounces must be tracked and acted on. Ignoring bounces is the fastest path to blocklisting. 4. **Warm up before you scale up** - New IPs and domains have zero reputation. Mailbox providers throttle unknown senders aggressively. A proper warm-up plan ramps volume gradually over 2-6 weeks, proving you are a legitimate sender before asking for high throughput. 5. **Monitor continuously, not reactively** - By the time users report "emails aren't arriving," the damage is done. Monitor bounce rates, complaint rates, and inbox placement proactively. Set alerts on thresholds, not symptoms. --- ## Core concepts Email deliverability is governed by three layers: **authentication** (proving you are who you claim to be), **reputation** (proving you send mail people want), and **behavior** (proving your sending patterns are consistent and trustworthy). **Authentication** uses three DNS-based protocols that work together. SPF declares which IPs may send on behalf of your domain. DKIM attaches a cryptographic signature to each message that receivers verify against a public key in your DNS. DMARC ties SPF and DKIM together with a policy that tells receivers what to do when authentication fails - and sends you reports about it. **Reputation** is a score maintained by each mailbox provider independently. It is influenced by complaint rates (users clicking "spam"), bounce rates, spam trap hits, engagement signals (opens, clicks, replies), and sending volume consistency. There is no single universal reputation score - Gmail, Outlook, and Yahoo each maintain their own. **Behavior** covers sending patterns: volume consistency, warm-up adherence, list hygiene practices, and how you handle bounces and unsubscribes. Sudden volume spikes, sending to stale lists, or ignoring unsubscribe requests all signal spammer behavior to mailbox providers. --- ## Common tasks ### Configure SPF SPF (Sender Policy Framework) declares which mail servers may send email for your domain via a DNS TXT record. ```dns example.com. IN TXT "v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.5 -all" ``` **Rules:** - Only one SPF record per domain (multiple records cause permerror) - Use `include:` for ESPs, `ip4:`/`ip6:` for your own servers - End with `-all` (hard fail) for production, `~all` (soft fail) only during testing - Stay under 10 DNS lookups total (each `include:` and `a:` costs one lookup) - Use SPF flattening tools if you hit the 10-lookup limit > The 10-lookup limit is the most common SPF misconfiguration. Each `include:` > triggers recursive lookups. Monitor with `dig TXT example.com` and count. ### Configure DKIM DKIM (DomainKeys Identified Mail) signs outgoing messages with a private key. Receivers verify the signature against a public key published in DNS. ```dns selector1._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBA..." ``` **Setup checklist:** - Generate a 2048-bit RSA key pair (1024-bit is deprecated) - Publish the public key as a TXT record at `<selector>._domainkey.<domain>` - Configure your mail server or ESP to sign outgoing mail with the private key - Use a unique selector per ESP so you can rotate keys independently - Test with `dig TXT selector._domainkey.example.com` to verify publication - Rotate keys annually - publish new key, wait 48h for propagation, then switch > If your TXT record exceeds 255 characters, split it into multiple strings > within a single TXT record. Most DNS providers handle this automatically. ### Deploy DMARC DMARC tells receivers what to do when SPF and DKIM fail, and sends you reports. ```dns _dmarc.example.com. IN TXT "v=DMARC1; p=reject; rua=mailto:dmarc@example.com; ruf=mailto:dmarc-forensic@example.com; adkim=s; aspf=s; pct=100" ``` **Deployment phases:** 1. Start with `p=none` - monitor only, collect reports for 2-4 weeks 2. Move to `p=quarantine; pct=10` - quarantine 10% of failures, increase gradually 3. Graduate to `p=reject` - full enforcement, only after all legitimate mail passes **Key parameters:** - `p=` policy: `none` (monitor), `quarantine` (spam folder), `reject` (drop) - `rua=` aggregate report destination (daily XML reports) - `adkim=s` strict DKIM alignment (From domain must exactly match DKIM d= domain) - `aspf=s` strict SPF alignment (From domain must exactly match envelope sender) > Never jump straight to `p=reject`. The monitoring phase catches legitimate > senders you forgot about (marketing tools, CRMs, invoicing systems). ### Plan an IP warm-up New IPs have no reputation. A warm-up schedule builds trust gradually. | Week | Daily volume | Target recipients | |---|---|---| | 1 | 50-200 | Most engaged (opened in last 30 days) | | 2 | 200-1,000 | Engaged (opened in last 60 days) | | 3 | 1,000-5,000 | Active (opened in last 90 days) | | 4 | 5,000-25,000 | Full list (excluding bounced/unsubscribed) | **Warm-up rules:** - Send to most engaged recipients first (highest open rates) - Maintain consistent daily volume - no spikes or gaps - Pause if hard bounces exceed 2% or complaints exceed 0.1% - Separate transactional and marketing mail on different IPs/subdomains - If blocklisted during warm-up, stop, clean list, restart from week 1 ### Handle bounces Bounces indicate delivery failures. Proper handling protects reputation. | Type | Meaning | Action | |---|---|---| | Hard bounce (5xx) | Permanent - address does not exist | Remove immediately, never retry | | Soft bounce (4xx) | Temporary - mailbox full, server down | Retry 3x over 72h, then suppress | | Complaint (FBL) | User clicked "Report spam" | Remove immediately, investigate cause | | Block bounce | IP/domain blocklisted | Check blocklists, request delisting | **Threshold alerts:** - Hard bounce rate > 2%: pause sending, clean list - Complaint rate > 0.1%: investigate content and list source - Soft bounce rate > 5%: check infrastructure and recipient domains > Process feedback loops (FBLs) from major providers. Gmail uses Postmaster > Tools. Yahoo/AOL use the standard ARF format. ### Monitor sender reputation **Key metrics and thresholds:** | Metric | Healthy | Warning | Critical | |---|---|---|---| | Bounce rate | < 1% | 1-2% | > 2% | | Complaint rate | < 0.05% | 0.05-0.1% | > 0.1% | | Spam trap hits | 0 | 1-2/month | > 2/month | | Inbox placement | > 95% | 85-95% | < 85% | **Monitoring tools:** Google Postmaster Tools (domain reputation for Gmail), Microsoft SNDS (IP reputation for Outlook), Sender Score by Validity (third-party IP score 0-100), MXToolbox (blocklist and DNS health checks). ### Diagnose spam folder placement When emails land in spam, investigate in this order: 1. **Check authentication** - verify SPF, DKIM, DMARC pass in email headers 2. **Check blocklists** - query Spamhaus, Barracuda, SURBL for your IP/domain 3. **Check reputation** - review Google Postmaster Tools and Microsoft SNDS 4. **Check content** - look for spam triggers (ALL CAPS, URL shorteners, etc.) 5. **Check engagement** - low open rates signal recipients don't want your mail 6. **Check infrastructure** - verify PTR record, confirm TLS for SMTP --- ## Anti-patterns / common mistakes | Mistake | Why it's wrong | What to do instead | |---|---|---| | No DMARC record | Domain open to spoofing, providers distrust unauthenticated mail | Deploy DMARC in monitor mode, graduate to reject | | Multiple SPF records | RFC violation causes permerror, all SPF checks fail | Merge into single TXT record with multiple includes | | Skipping warm-up | Sudden volume from unknown IP triggers throttling and blocks | Follow 2-6 week graduated warm-up plan | | Ignoring hard bounces | Repeated sends to dead addresses signal spammer behavior | Remove hard bounces on first occurrence | | Buying email lists | Purchased lists contain spam traps and uninterested recipients | Build organic lists with double opt-in | | Shared IP without vetting | Other senders on shared IP can ruin your deliverability | Use dedicated IPs for volume > 50K/month | | No unsubscribe link | Violates CAN-SPAM/GDPR, forces users to report spam instead | Include one-click unsubscribe (RFC 8058) and visible link | | Sending from no-reply address | Discourages replies which are a positive engagement signal | Use a monitored reply-to address | --- ## Gotchas 1. **SPF over 10 DNS lookups silently fails - and many senders don't know they've hit the limit** - Each `include:`, `a:`, and `mx:` mechanism in an SPF record triggers recursive DNS lookups counted toward the 10-lookup limit. Many companies hit this limit after adding a third or fourth ESP. The result is a `permerror` that causes SPF to fail for all mail, silently. Use an SPF flattening tool and monitor lookup counts. 2. **Jumping straight to `p=reject` DMARC breaks legitimate mail you forgot about** - CRMs, invoicing tools, support platforms, marketing automation, and third-party senders often send on behalf of your domain without proper DKIM signing. Deploy `p=none` first, monitor aggregate reports for at least 2-4 weeks, and only graduate to `p=reject` after all legitimate sources are authenticated. 3. **Sending to a re-engagement segment before warming up a new IP causes blocklisting** - Dormant subscribers are more likely to mark mail as spam. During IP warm-up, send only to your most engaged subscribers (opened in the last 30 days). Bringing stale addresses into a new IP's warm-up period can tank the IP reputation before it's established. 4. **DKIM keys in DNS must not exceed 255 characters per string without splitting** - A 2048-bit RSA public key in base64 exceeds 255 characters. DNS TXT records must split values into multiple quoted strings within the record. Some DNS providers handle this automatically; others require manual splitting. Test with `dig TXT selector._domainkey.yourdomain.com` and verify the key assembles correctly. 5. **Feedback loop (FBL) complaint data requires separate registration per provider** - Gmail uses Google Postmaster Tools, Yahoo/AOL uses their FBL program, and Outlook uses Microsoft SNDS. These are separate registrations with separate dashboards. Many senders set up SPF/DKIM/DMARC and assume they'll receive complaint data automatically - they won't. --- ## References For detailed implementation guidance on specific sub-domains, read the relevant file from the `references/` folder: - `references/spf-dkim-dmarc.md` - complete DNS record syntax, alignment modes, troubleshooting authentication failures, BIMI setup - `references/warm-up-and-reputation.md` - detailed warm-up schedules by volume tier, reputation recovery playbooks, blocklist delisting procedures - `references/bounce-handling.md` - bounce code reference, FBL setup per provider, suppression list management, list hygiene automation Only load a references file if the current task requires it - they are long and will consume context. --- ## Companion check > On first activation of this skill in a conversation: check which companion skills are installed by running `ls ~/.claude/skills/ ~/.agent/skills/ ~/.agents/skills/ .claude/skills/ .agent/skills/ .agents/skills/ 2>/dev/null`. Compare the results against the `recommended_skills` field in this file's frontmatter. For any that are missing, mention them once and offer to install: > ``` > npx skills add AbsolutelySkilled/AbsolutelySkilled --skill <name> > ``` > Skip entirely if `recommended_skills` is empty or all companions are already installed.
More from mkurman/zorai
- account-management>
- agile-scrum>
- albumentationsFast image augmentation library (Albumentations). 70+ transforms for classification, segmentation, object detection, keypoints, and pose estimation. Optimized OpenCV-based pipeline with unified API across all CV tasks. Supports images, masks, bounding boxes, and keypoints simultaneously. Note: classic Albumentations (MIT) is no longer maintained; successor AlbumentationsX uses AGPL-3.0. For torchvision-native augmentations, use torchvision.transforms.v2.
- aml-complianceAnti-Money Laundering (AML) and Know Your Customer (KYC) compliance workflow. Sanctions screening, PEP detection, transaction monitoring, suspicious activity reporting (SAR), and OFAC compliance.
- anki-connectThis skill is for interacting with Anki through AnkiConnect, and should be used whenever a user asks to interact with Anki, including to read or modify decks, notes, cards, models, media, or sync operations.
- approval-checkpoint-long-taskCanonical long-task pack for daemon-managed work with deliberate approval checkpoints, status summaries, rollback notes, and mobile-safe governance-aware updates.
- auditing-goal-artifactsUse when reviewing recent zorai goal run outputs, closure markers, ledgers, or evidence bundles to judge whether completion is credible or to identify remaining uncertainty.
- autogenAutoGen (Microsoft) — multi-agent conversation framework. Agent-to-agent chat, code generation & execution, tool use, group chat, and human-in-the-loop. Build collaborative AI systems with specialized agents.
- backtraderPython backtesting framework for trading strategies. Data feeds, brokers, analyzers, and live trading support. Strategy development with commission models, slippage, and signal-based execution.
- beautiful-mermaidRender Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.