- Add Logto OIDC integration (app/core/logto.py): CookieStorage adapter, create/decode session token helpers, sync_logto_user upsert - New auth endpoints (/api/v1/auth): sign-in, callback, sign-out, me - AuthRedirectMiddleware: protects HTML pages, redirects to /setup when Logto is unconfigured, to /login otherwise - Update require_admin_auth: accepts dmarq_session cookie JWT first, then API key, then Bearer JWT (fully backward compatible) - Update User model: add logto_id, username, picture, created_at, updated_at; make hashed_password nullable for Logto-only users; is_superuser default=True - New Alembic migration d4e5f6a7b8c9 for the above schema changes - Add LOGTO_ENDPOINT / LOGTO_APP_ID / LOGTO_APP_SECRET / LOGTO_REDIRECT_URI settings with logto_configured property - Create login.html (Sign in with Logto button) and setup.html (step-by-step configuration guide) - Update base.html: user menu with avatar/name and sign-out via Alpine.js fetch to /api/v1/auth/me - Update settings.html: remove localStorage adminApiKey; session cookie is sent automatically by browser; add 401 → /login redirect - Update requirements.txt: replace fastapi-users additions with logto + aiohttp - Add test_auth.py: 18 new tests covering session tokens, CookieStorage, sync_logto_user, /me, /sign-in (503), /sign-out cookie clearing - Fix test_security_extra.py: pass Request mock to require_admin_auth; add new test_valid_session_cookie_returns_auth_context Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/b448f585-7646-40f8-ae2d-9986c361e3fd Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
DMARQ
DMARQ is a modern, privacy-conscious DMARC monitoring and analysis platform built for professionals who want deep visibility into their email authentication posture — without giving up control or relying on third-party SaaS providers.
🌐 Live Demo (soon)
🔒 Self-hosted. Secure. Beautifully visual.
🛠️ Docker-deployable. Cloudflare-integrated.
📬 Aggregate & forensic report support.
💡 What is DMARQ?
DMARQ ingests and visualizes DMARC (Domain-based Message Authentication, Reporting & Conformance) reports — both aggregate and forensic — to help domain owners understand who is sending emails on their behalf and whether those messages are properly authenticated using SPF and DKIM.
No more guessing. See which services are passing DMARC, which are failing, and how to fix them — all in one clear dashboard.
🚀 Current Status - Milestone 1 Completed
We have achieved Milestone 1: Basic DMARC Monitoring. This milestone includes:
- ✅ DMARC XML report parsing (supports XML, ZIP, and GZIP formats)
- ✅ In-memory storage of report data for up to 5 domains
- ✅ Simple dashboard UI showing DMARC compliance statistics
- ✅ Support for uploading and processing DMARC aggregate reports
- ✅ Domain overview with compliance rates and email statistics
You can now:
- Upload DMARC aggregate reports via the web interface
- View summary statistics across all monitored domains
- Drill down into domain-specific details and reports
- Track compliance rates and authentication failures
✨ Key Features
📊 Dashboard & Reports
- DMARC Compliance Rate: Track pass/fail rates over time
- Enforcement Rate: Visualize policy strength and adoption
- Volume & Trends: Identify traffic spikes and anomalies
- Top Sending Sources: Detect unknown or unauthorized senders
- Forensic Reports: Analyze failure samples (RFC 6591 support)
🛡 DNS Record Health
- Inspect SPF, DKIM, DMARC, MX, and BIMI records
- Show which records are missing, broken, or invalid
- Get fix suggestions tailored to your provider (e.g., Google, Microsoft)
- 🔒 No automatic changes — all DNS updates require explicit confirmation
🌐 Cloudflare Integration
- Automatically discover domains in your Cloudflare account
- Fetch and analyze relevant DNS records
- Suggest missing or malformed entries
- Track configuration changes over time (coming soon)
⚙️ Web-Based Setup Wizard
- Guided onboarding experience (no CLI setup required)
- Store all configuration in a secure internal database
- Seed config with environment variables for headless deployment
🚨 Alerts & Notifications
- Integration with Apprise
- Email, Slack, webhook, and more
- Alert on new failures, compliance drops, or unknown senders
🔐 User Management
- Built-in authentication via FastAPI Users
- JWT-secured API endpoints
- Admin dashboard access control
🚀 Getting Started
You can deploy DMARQ in minutes using Docker Compose:
git clone https://github.com/YOUR_USERNAME/dmarq.git
cd dmarq
cp .env.example .env
docker compose up --build
Then visit http://localhost to access the dashboard and upload your DMARC reports.
Development Setup
For development without Docker:
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8080
Then visit http://localhost:8080
📦 Requirements
- DMARC aggregate reports (XML, ZIP, or GZIP format)
- Docker + Docker Compose (for production deployment)
- Python 3.13+ (for development)
🧪 Development Roadmap
- ✅ Milestone 1: Basic DMARC Monitoring (up to 5 domains)
- ✅ Milestone 2: IMAP Integration
- ✅ Milestone 3: Database Persistence
- 🔜 Milestone 4: Enhanced Dashboard & Visualization
- 🔜 Milestone 5: User Authentication & Multi-User Support
See the full Roadmap and TODO for details on what is planned vs. what is currently implemented.
📘 License
MIT License — you are free to use, modify, and host DMARQ for any purpose.
🤝 Contributing
Pull requests are welcome! Please open an issue to discuss major features or design ideas before submitting code. See CONTRIBUTING.md for the full guide.
This project uses Conventional Commits and python-semantic-release for automated versioning and changelog generation.
🛡 Why DMARQ?
Unlike most commercial DMARC tools, DMARQ gives you:
- 🔍 Full visibility without third-party access to your reports
- 🧠 Intelligence-driven suggestions, not just raw data
- 🎨 A beautiful, intuitive dashboard with real-time insights
- 💻 Self-hosted flexibility with modern developer practices
Let's build better email security — together.