# OpsLint — RFC 7489 DMARC, DKIM & BIMI Verification Workbench

Canonical URL: https://opslint.dev/dmarc/
Remote MCP Endpoint: https://opslint.dev/mcp (tool: `lint_spf_record` audits both SPF and DMARC + external RUA)

## Capabilities

- **RFC 7489 §6.6.3 Organizational Domain Discovery via Public Suffix List (`psl`)**: Queries `_dmarc.<domain>` first; if absent on a subdomain (e.g. `mail.billing.example.co.uk`), derives the organizational domain (`example.co.uk`) via `psl`, queries `_dmarc.example.co.uk`, and applies `sp=` (or falls back to `p=`).
- **RFC 7489 §7.1 External Report Destination Verification**: For every `rua=mailto:...` or `ruf=mailto:...` URI whose receiver host has a different organizational domain from `<domain>`, queries `<domain>._report._dmarc.<report-host>` TXT for `v=DMARC1` and emits the exact missing authorization record if unverified.
- **DKIM Selector Quick-Prober (`RFC 6376` / `RFC 8301` / `RFC 8463`)**: Probes common ESP selectors (`google`, `resend`, `s1`, `s2`, `k1`, `pm`, `selector1`, `selector2`, plus custom selectors), follows `CNAME` delegations, detects revoked `p=` keys, flags 44-byte Ed25519 ASN.1 SPKI wrappers vs raw 32-byte RFC 8463 keys, and estimates RSA public key bit length (`1024` vs `2048` vs `4096`).
- **BIMI TXT & Offline SVG Tiny-PS Validator**: Verifies `default._bimi.<domain>` (falling back to organizational domain) and DMARC enforcement prerequisite (`p=reject` or `p=quarantine; pct=100`), plus validates pasted/local SVG files completely offline (`baseProfile="tiny-ps"`, `version="1.2"`, `<title>`, absence of `<script>`/`<image>`/`<a>`/root `x`/`y`, square `viewBox`, `<= 32 KB`). Never fetches cross-origin remote SVGs.
- **Sanitized DMARC, DKIM & BIMI TXT Record Generators**: Generates RFC-compliant `_dmarc`, `<selector>._domainkey` (auto-stripping PEM armor and 44-byte OpenSSL Ed25519 SPKI prefixes, splitting `>255`-byte RSA records), and `default._bimi` TXT records.

## Deep-Link `#hash` Parameters (Zero Server Leakage)

- `https://opslint.dev/dmarc/#domain=example.com`
- `https://opslint.dev/dmarc/#domain=mail.billing.example.co.uk&selectors=google,pm,s1`
- `https://opslint.dev/dmarc/#txt=v%3DDMARC1%3B%20p%3Dreject%3B%20rua%3Dmailto%3Admarc%40example.com%3B`

## Remote MCP Integration

Endpoint: `https://opslint.dev/mcp` — calling `lint_spf_record({ domain })` inspects both recursive SPF budgets and the domain's DMARC policy, PSL fallback, and external `_report._dmarc.` RUA authorization in a single shared DoH session.
