email-infrastructure
БесплатноБез исполняемых скриптовНе проверенEmail deliverability and DNS-based email authentication covering SPF, DKIM, DMARC, MX, PTR, and BIMI records, SMTP relay service configuration (SendGrid, SES…
от claude-dev-suite★ 51 звезда на GitHubОб этом скилле
Email Infrastructure — Deliverability and DNS Authentication
Why Email Authentication Matters
Without SPF + DKIM + DMARC, any server can forge From: [email protected]. Major providers (Google, Microsoft, Yahoo) now reject or spam-folder unauthenticated email. As of 2024, Gmail and Yahoo require DMARC for bulk senders.
| Record | What It Does | Where Set |
|---|---|---|
| MX | Where to deliver inbound email | DNS |
| SPF | Which servers are authorized to send for this domain | DNS (TXT) |
| DKIM | Cryptographic signature verifying message origin | DNS (TXT) + mail server |
| DMARC | Policy for SPF/DKIM failures + reporting | DNS (TXT) |
| PTR | Reverse DNS for sending IP | Hosting provider |
| BIMI | Brand logo in inbox (requires DMARC reject) | DNS (TXT) |
MX Records
; Priority lower = higher preference (10 < 20)
example.com. 3600 IN MX 10 mail1.example.com.
example.com. 3600 IN MX 20 mail2.example.com.
For relay-only setups (all outbound, no self-hosted inbound), set MX to your relay provider's receiving servers or use a catch-all:
; SendGrid inbound parse MX
example.com. 3600 IN MX 10 mx.sendgrid.net.
Test MX records:
dig MX example.com
nslookup -type=MX example.com
# From MXToolbox:
# https://mxtoolbox.com/MXLookup.aspx
SPF (Sender Policy Framework)
SPF Mechanisms
| Mechanism | Meaning |
|---|---|
ip4:1.2.3.4 |
Authorize single IPv4 address |
ip4:1.2.3.0/24 |
Authorize IPv4 CIDR range |
ip6:2001:db8::/32 |
Authorize IPv6 CIDR |
include:spf.example.com |
Include another domain's SPF (counts as 1 lookup) |
a |
Authorize the domain's A record IP |
mx |
Authorize the domain's MX server IPs |
~all |
Softfail — treat unauthorized as suspicious (recommended during testing) |
-all |
Hardfail — reject unauthorized senders (use only with DMARC p=reject live) |
?all |
Neutral — no policy (avoid in production) |
+all |
Allow all — completely useless and dangerous, never use |
SPF Record Examples
; Basic SPF for domain using only SendGrid
example.com. 3600 IN TXT "v=spf1 include:sendgrid.net ~all"
; Multiple authorized senders
example.com. 3600 IN TXT "v=spf1 ip4:203.0.113.10 include:sendgrid.net include:amazonses.com ~all"
; Include your hosting provider's IP range + relay
example.com. 3600 IN TXT "v=spf1 ip4:203.0.113.0/24 include:spf.mailgun.org ~all"
SPF Lookup Limit
SPF allows a maximum of 10 DNS lookups during evaluation. include:, a, mx, ptr, exists each count as a lookup. Exceeding 10 causes permerror, which DMARC treats as a failure.
# Check SPF record and count lookups
dig TXT example.com | grep spf
# Use spf-tools to flatten (replace includes with raw IPs)
# pip install pyspf
python3 -m spf example.com
SPF flattening: replace include:sendgrid.net with the actual IPs from SendGrid's SPF record. Must be re-flattened when SendGrid rotates IPs — use automation or a flattening service.
DKIM (DomainKeys Identified Mail)
DKIM Key Generation
# Generate 2048-bit RSA key pair
openssl genrsa -out dkim_private.key 2048
openssl rsa -in dkim_private.key -pubout -out dkim_public.key
# Extract public key content for DNS TXT record
openssl rsa -in dkim_private.key -pubout -outform der 2>/dev/null | base64 -w0
DKIM DNS TXT Record Format
Selector naming convention: use <year><month> or service name (e.g., sg2024, ses1, mail).
; Full format: <selector>._domainkey.<domain>
sg2024._domainkey.example.com. 3600 IN TXT (
"v=DKIM1; k=rsa; p="
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."
"...rest of public key in base64..."
)
Split into multiple strings (DNS TXT records max 255 chars per string):
# Split public key for DNS (many DNS providers do this automatically)
openssl rsa -in dkim_private.key -pubout 2>/dev/null | \
grep -v "^-" | tr -d '\n' | \
fold -w 200
DKIM Configuration in Relay Providers
SendGrid: Domains → Add Domain → CNAME records provided (SendGrid manages keys). Custom DKIM requires dedicated IP.
Amazon SES: Email Identities → Verify Domain → DKIM section → Create DKIM (SES manages 2048-bit keys). Three CNAME records provided.
Postmark: Sender Signatures → Add Domain → DKIM TXT records provided.
Test DKIM record:
dig TXT sg2024._domainkey.example.com
# Send a test email and check headers for:
# DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=sg2024; ...
# Authentication-Results: dkim=pass header.d=example.com
DMARC (Domain-based Message Authentication, Reporting & Conformance)
DMARC Record Structure
_dmarc.example.com. 3600 IN TXT (
"v=DMARC1;"
"p=quarantine;" ; none | quarantine | reject
"rua=mailto:[email protected];" ; Aggregate
Установить email-infrastructure в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWriteEditBashFAQ
Что делает скилл email-infrastructure?
Email deliverability and DNS-based email authentication covering SPF, DKIM, DMARC, MX, PTR, and BIMI records, SMTP relay service configuration (SendGrid, SES, Postmark, Mailgun), self-hosted Postfix relay basics, and deliverability testing. USE WHEN: - Setting up or auditing email DNS records (SPF, DKIM, DMARC, MX, PTR) - Configuring a transactional email relay service (SendGrid, Amazon SES, Postmark) - Rolling out a DMARC policy from p=none to p=reject - Debugging emails landing in spam or being rejected - Generating DKIM key pairs for a custom domain - Setting up Postfix as a smart relay host - Checking email blacklists and Google Postmaster Tools DO NOT USE FOR: - Building a full mail server (Dovecot IMAP, Postfix + Dovecot stack — scope is relay/deliverability) - Marketing email platform setup (Mailchimp, Klaviyo campaign workflows) - Email template design or HTML email rendering - Inbound email parsing pipelines (use SendGrid Inbound Parse, Mailgun Routes, etc.)
Как установить скилл email-infrastructure?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл email-infrastructure запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic