DMARC Monitor
Automated DMARC aggregate report collection and analysis for cPanel servers
v1.0.3 cPanel / WHM Python 3 PHP 8 Released 2026-05-20

DMARC Monitor is a self-hosted suite of scripts that connects to a cPanel mailbox via IMAP, fetches DMARC aggregate report emails, parses the embedded XML, and displays the results in a clean PHP dashboard. It shows per-domain SPF and DKIM pass rates, identifies unauthorized sending sources, and provides plain-English recommended actions for every issue found. A cron job runs automatically every 4 hours — no manual intervention needed.

Automatic IMAP fetching
Connects directly to your cPanel mailbox via localhost, decompresses ZIP and GZ attachments, and parses DMARC XML reports automatically.
Multi-domain dashboard
Groups reports by domain and shows SPF/DKIM pass rates, policy enforcement status, and per-source breakdowns for every domain on your server.
Actionable findings
Identifies SPF failures, DKIM failures, unknown sending sources, and quarantined messages — each with a specific recommended fix.
DNS bulk tools
Shell scripts to add, audit, fix, and verify DMARC DNS records across all domains on the server in one command.
Files included
index.phpPHP dashboard with login, domain analysis, run log, and settings
fetch_dmarc.pyPython IMAP fetcher and DMARC XML parser with fingerprinting
config.iniConfiguration template for IMAP credentials and file paths
setup.shOne-time server setup — directories, file deployment, cron job
add_dmarc_records.shBulk-add _dmarc TXT records for all domains via WHM API
audit_dmarc.shAudit all domains for missing or misconfigured DMARC records
fix_dmarc_records.shAuto-fix duplicate and broken DMARC records across all domains
verify_dmarc.shColor-coded verification report — pass/fail status for every domain
Requirements
cPanel / WHM server
Python 3.6+
PHP 8.0+
SSH / terminal access
Dedicated DMARC mailbox
No external dependencies
Changelog
v1.0.3 2026-05-20 Cron run tracking added. fetch_dmarc.py now writes last_run.json after each run. Dashboard status bar shows last run time, emails checked, and new reports added.
v1.0.2 2026-05-20 Settings page added. Username and password changeable from within the dashboard. Credentials stored using PHP password_hash(). Auth file auto-created on first load.
v1.0.1 2026-05-20 Dashboard redesigned with full sidebar navigation. Color-coded metric cards, hover table rows, redesigned login page, severity-sorted domain overview.
v1.0.0 2026-05-20 Initial release. IMAP fetcher, XML parser, multi-domain PHP dashboard, session login, DNS bulk tools (add, audit, fix, verify), fingerprint-based deduplication.