A DMARC and email-auth workflow toolkit focused on operational reliability and analyst speed.
- Impact: Reduces manual effort in DMARC validation, parsing, and reporting workflows.
- Scale: Supports direct CLI use and automation-friendly execution paths.
- Use case: Domain email-auth auditing, report parsing, and operational monitoring.
- DMARC record validation and XML parsing
- Optional advanced reporting and metrics components
- Daily-run and cron-oriented workflow support
- ✅ Check if a domain has a valid DMARC record
- ✅ Parse zipped DMARC XML aggregate reports
- ✅ CLI-compatible and self-contained
- 🚀 Prometheus-style
/metricsexport - 🚀 AbuseIPDB auto-takedown script
- 🚀 GPT-powered DMARC forensic summariser
dmarc.exe
├── core/
│ ├── dmarc_parser.py # Parses .gz XML reports
│ └── dmarc_checker.py # Checks DMARC TXT DNS record
├── advanced/
│ ├── prometheus_exporter.py # Flask app for /metrics
│ ├── abuse_reporter.py # Auto-abuse IP reporting
│ └── gpt_summariser.py # Uses GPT to summarise findings
├── data/ # Put sample reports here
├── config/
│ └── config.ini # API keys and secrets (excluded from git)
├── scripts/
│ ├── run_daily.sh # Cron/automation entry point
│ └── cron_example.txt # Crontab example
├── main.py # Demo runner
├── requirements.txt
├── .gitignore
└── README.md
To install all necessary packages:
pip install -r requirements.txtThis tool parses DMARC XML reports and displays per-IP activity, DMARC policy outcomes, and optionally exports data to Prometheus metrics or reports abusers to AbuseIPDB.
python main.py example.comThis command:
-Checks the DMARC record for example.com
-Parses the sample report at data/sample_report.xml.gz
-Outputs results to the terminal
Run only DMARC check:
python main.py example.com --check-onlyRun only report parsing:
python main.py --parse-only --report data/sample_report.xml.gzUse a custom report path while checking a domain:
python main.py example.com --report /path/to/report.xml.gz-Give threat intel and mail engineers rapid insight into spoofing attacks
-Enable visibility and automation at any scale — even cron
-Experiment with AI, not depend on it
# 1) Run a core check
# 2) Request JSON output
# 3) Pipe into jq for analyst workflows
