English · Türkçe
MailVerity is an explainable email-authentication posture auditor and policy laboratory. It inspects SPF, DKIM, and the current RFC 9989 DMARC record format, then turns DNS text into prioritized findings and concrete remediation guidance. Its simulator never generates or sends email.
Posture scoring helps prioritize review. It is not a guarantee of inbox placement or proof that a domain cannot be spoofed.
- audits SPF records and recursively estimates DNS-querying terms against RFC 7208's limit;
- catches
+all, neutral/softfail policy, deprecatedptr, invalid networks, duplicate records, unknown mechanisms, and thin lookup headroom; - understands RFC 9989 DMARC tags including
np,psd, andt; - identifies legacy
pct,rf, andritags removed from the current DMARC format; - inspects explicitly supplied DKIM selectors for malformed, revoked, short, or testing keys;
- provides a safe DMARC alignment and disposition simulator;
- supports deterministic offline DNS fixtures for education, CI, and incident reports;
- produces human-readable or stable JSON output with useful exit codes.
python -m pip install "git+https://github.com/gorkemguler/MailVerity.git"For local development:
git clone https://github.com/gorkemguler/MailVerity.git
cd MailVerity
python -m pip install -e '.[dev]'Python 3.10+ is required.
mailverity audit example.comDKIM selectors cannot be safely enumerated. Read the s= value from a recent, trusted
DKIM-Signature header and supply it explicitly:
mailverity audit example.com --selector selector1 --selector google--common-selectors checks a small convenience list, but a missing guessed selector is not
treated as a vulnerability.
JSON output and a CI threshold:
mailverity audit example.com --selector selector1 --json --fail-on medium > posture.jsonThis command models alignment and policy handling. It performs no DNS request and sends no mail:
mailverity simulate news.example.com \
--organizational-domain example.com \
--spf-result pass \
--spf-domain bounce.example.com \
--dkim-result fail \
--policy rejectUse --aspf s or --adkim s for strict alignment and --test-mode to model RFC 9989 t=y.
Audits can be reproduced without network access:
{
"example.com": "v=spf1 ip4:192.0.2.0/24 -all",
"_dmarc.example.com": "v=DMARC1; p=reject; rua=mailto:dmarc@example.com",
"s1._domainkey.example.com": "v=DKIM1; k=rsa; p=BASE64_PUBLIC_KEY"
}mailverity audit example.com --offline dns.json --selector s1| Code | Meaning |
|---|---|
0 |
Audit completed and no finding reached --fail-on, or simulation completed |
1 |
Audit completed and a finding reached the selected threshold |
2 |
Invalid input, fixture problem, or DNS operational error |
MailVerity audits a direct _dmarc.<domain> record. RFC 9989 DNS Tree Walk policy discovery
depends on message context and is intentionally not presented as a full receiver implementation.
The simulator asks for the organizational domain explicitly when relaxed alignment crosses
subdomains, avoiding outdated public-suffix assumptions.
pytest --cov=mailverity --cov-report=term-missing
ruff check .MIT © Görkem Güler
