Metadata-Version: 2.4
Name: mxwarden-spec
Version: 1.2.0
Summary: Zero-dependency RFC 7208 SPF 10-lookup CI gate, DMARC alignment & RFC 5322 header auditor
Author-email: MXWarden Engineering <support@mxwarden.com>
License: MIT
Project-URL: Homepage, https://mxwarden.com
Project-URL: Repository, https://github.com/lerenhuan-hash/mxwarden-spec
Project-URL: Documentation, https://mxwarden.com/llms-full.txt
Project-URL: Header X-Ray, https://mxwarden.com/#xray
Project-URL: BIMI SVG Converter, https://mxwarden.com/tools/bimi-svg-tiny-ps-converter
Keywords: spf,dmarc,dkim,email-deliverability,dns,rfc7208,rfc7489,bimi,mta-sts
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Internet :: Name Service (DNS)
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# mxwarden-spec — Zero-Dependency SPF 10-Lookup, DMARC & Header Alignment CI Gate

[![CI](https://github.com/lerenhuan-hash/mxwarden-spec/actions/workflows/ci.yml/badge.svg)](https://github.com/lerenhuan-hash/mxwarden-spec/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/mxwarden-spec.svg)](https://pypi.org/project/mxwarden-spec/)
[![npm](https://img.shields.io/npm/v/mxwarden-spec.svg)](https://www.npmjs.com/package/mxwarden-spec)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)

Prevent accidental corporate email outages in CI/CD before a new SaaS `include:` pushes your domain past RFC 7208's 10-DNS-lookup `PermError` ceiling, pre-flight proposed SPF records in Terraform/DNSControl PRs **with zero API keys**, or diagnose `SPF/DKIM Auth PASS + Alignment FAIL` header traps offline.

- **Zero external dependencies & zero API key required** (pure Python 3.9+ stdlib & pure Node.js 18+ ESM)
- **Composite GitHub Action (`action.yml`)** with automatic Markdown Job Summary (`$GITHUB_STEP_SUMMARY`)
- **Pre-flight SPF PR Gate (`--spf-record`)** for DNS-as-Code pipelines before pushing DNS changes
- **RFC 7766 TCP fallback** for large multi-TXT enterprise domains (`>512B` / `>4096B`)
- **RFC 7208 void-lookup counter** (`>2` `NXDOMAIN` lookups fail before hitting production)
- **Offline RFC 5322 / RFC 7489 Header Alignment Inspector** (`--header-file sample.eml`)

---

## 1. GitHub Actions (1-Line Drop-In, Zero API Key)

### Live Domain Schedule / PR Guardrail
```yaml
name: Domain Email Auth Gate
on:
  schedule:
    - cron: "0 8 * * 1"
  workflow_dispatch:
jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: lerenhuan-hash/mxwarden-spec@v1.2.0
        with:
          domains: "example.com mail.example.com"
          max-lookups: "9"
          require-dmarc-enforce: "true"
```

### Pre-Flight Proposed SPF Record (Terraform / DNSControl / octoDNS PRs)
```yaml
      - uses: lerenhuan-hash/mxwarden-spec@v1.2.0
        with:
          spf-record: "v=spf1 include:_spf.google.com include:sendgrid.net ~all"
          max-lookups: "9"
```

### Offline Email Header Alignment Audit
```yaml
      - uses: actions/checkout@v4
      - uses: lerenhuan-hash/mxwarden-spec@v1.2.0
        with:
          header-file: "examples/sample_aligned_header.eml"
```

---

## 2. Local CLI Quick Start

### Python (`pipx` / `pip`)
```bash
pipx run mxwarden-spec company.com --require-dmarc-enforce
mxwarden-spec --spf-record "v=spf1 include:_spf.google.com ~all" --max-lookups 9
mxwarden-spec --header-file raw_email.eml --json
```

### Node.js (`npx`)
```bash
npx mxwarden-spec company.com --max-lookups 9 --require-dmarc-enforce
npx mxwarden-spec --header-file raw_email.eml --json
```

---

## 3. RFC & Troubleshooting Reference Specifications (`docs/`)

- [RFC 7208 SPF 10-DNS-Lookup PermError & Void-Lookup Specification](./docs/spf-10-lookup-permerror-rfc7208.md)
- [RFC 7489 DMARC Identifier Alignment & SMTP 550 Error Reference](./docs/dmarc-alignment-and-550-errors.md)
- [BIMI SVG Tiny 1.2 PS, MTA-STS (RFC 8461) & Parked-Domain Lockdown Spec](./docs/bimi-svg-tiny-ps-and-mta-sts-spec.md)

---

## 4. Live Web Diagnostics, Browser Extension & Free Browser-Local Utilities

Need automatic 15-minute Anycast CIDR-tree SPF compression, calm 3-Bucket DMARC RUA monitoring, 1-click Hosted MTA-STS, or white-label MSP executive PDFs?
- [MXWarden 1-Second Recursive Scanner & Header X-Ray](https://mxwarden.com/)
- [MXWarden Microsoft Edge Extension](https://microsoftedge.microsoft.com/addons/detail/mfffbefmocebnlgihbciiphbahclagfh)
- [Free Browser-Local BIMI SVG Tiny 1.2 PS Converter](https://mxwarden.com/tools/bimi-svg-tiny-ps-converter)
- [Free Browser-Local DMARC `.xml`/`.gz`/`.zip` Report Reader](https://mxwarden.com/tools/dmarc-xml-report-reader)
- [Free SMTP 550 Bounce Error Decoder](https://mxwarden.com/tools/smtp-bounce-error-decoder)
- [Free Parked-Domain Anti-Spoofing Lockdown Generator](https://mxwarden.com/tools/parked-domain-lockdown-generator)
- [Complete Technical Specification (`/llms-full.txt`)](https://mxwarden.com/llms-full.txt)

## License
MIT
