{"id":32861856,"url":"https://github.com/meysam81/parse-dmarc","last_synced_at":"2026-03-13T06:04:04.285Z","repository":{"id":322559443,"uuid":"1089959979","full_name":"meysam81/parse-dmarc","owner":"meysam81","description":"🛡️ A lightweight, self-hosted DMARC report parser with a beautiful Vue.js dashboard. Single-binary deployment with IMAP integration, SQLite storage, and RFC 7489 compliance. Built with Go and Vue 3 - no external dependencies required.","archived":false,"fork":false,"pushed_at":"2026-03-11T07:03:46.000Z","size":14631,"stargazers_count":93,"open_issues_count":7,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-11T13:51:33.895Z","etag":null,"topics":["compliance","dashboard","dkim","dmarc","dmarc-reports","docker","email-authentication","email-monitoring","email-security","golang","imap","parsedmarc","reporting","rfc7489","self-hosted","single-binary","spf","sqlite","vue3","vuejs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meysam81.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"meysam81","patreon":"meysam81","buy_me_a_coffee":"meysam"}},"created_at":"2025-11-05T03:31:29.000Z","updated_at":"2026-03-11T09:08:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/meysam81/parse-dmarc","commit_stats":null,"previous_names":["meysam81/parse-dmarc"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/meysam81/parse-dmarc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysam81%2Fparse-dmarc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysam81%2Fparse-dmarc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysam81%2Fparse-dmarc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysam81%2Fparse-dmarc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meysam81","download_url":"https://codeload.github.com/meysam81/parse-dmarc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meysam81%2Fparse-dmarc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30459781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T03:55:51.346Z","status":"ssl_error","status_checked_at":"2026-03-13T03:55:33.055Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compliance","dashboard","dkim","dmarc","dmarc-reports","docker","email-authentication","email-monitoring","email-security","golang","imap","parsedmarc","reporting","rfc7489","self-hosted","single-binary","spf","sqlite","vue3","vuejs"],"created_at":"2025-11-08T22:00:56.101Z","updated_at":"2026-03-13T06:04:04.276Z","avatar_url":"https://github.com/meysam81.png","language":"Go","funding_links":["https://github.com/sponsors/meysam81","https://patreon.com/meysam81","https://buymeacoffee.com/meysam"],"categories":["Go"],"sub_categories":[],"readme":"# Parse DMARC\n\n[![License](https://img.shields.io/github/license/meysam81/parse-dmarc?style=flat-square)](https://github.com/meysam81/parse-dmarc/blob/main/LICENSE)\n[![GitHub release](https://img.shields.io/github/v/release/meysam81/parse-dmarc?style=flat-square)](https://github.com/meysam81/parse-dmarc/releases)\n[![GitHub Stars](https://img.shields.io/github/stars/meysam81/parse-dmarc?style=flat-square\u0026logo=github)](https://github.com/meysam81/parse-dmarc/stargazers)\n[![GitHub Issues](https://img.shields.io/github/issues/meysam81/parse-dmarc?style=flat-square\u0026logo=github)](https://github.com/meysam81/parse-dmarc/issues)\n[![Go Report Card](https://goreportcard.com/badge/github.com/meysam81/parse-dmarc?style=flat-square)](https://goreportcard.com/report/github.com/meysam81/parse-dmarc)\n[![Made with Go](https://img.shields.io/badge/Made%20with-Go-1f425f.svg?style=flat-square\u0026logo=go)](https://go.dev)\n[![Made with Vue.js](https://img.shields.io/badge/Made%20with-Vue.js-4FC08D.svg?style=flat-square\u0026logo=vue.js)](https://vuejs.org)\n[![Docker Hub](https://img.shields.io/badge/Docker%20Hub-meysam81%2Fparse--dmarc-blue?style=flat-square\u0026logo=docker)](https://hub.docker.com/r/meysam81/parse-dmarc)\n[![Docker Pulls](https://img.shields.io/docker/pulls/meysam81/parse-dmarc?style=flat-square\u0026logo=docker)](https://hub.docker.com/r/meysam81/parse-dmarc)\n[![Docker Image Size (tag)](https://img.shields.io/docker/image-size/meysam81/parse-dmarc/v1)](https://hub.docker.com/r/meysam81/parse-dmarc)\n\n**Monitor who's sending email on behalf of your domain. Catch spoofing. Stop phishing.**\n\n[![Parse DMARC](./assets/social-preview.png)](https://github.com/meysam81/parse-dmarc)\n\n## Deploy Your Own Instance\n\nDeploy Parse DMARC to your favorite cloud provider with one click:\n\n### Platform as a Service (PaaS)\n\n| Provider       | Deploy                                                                                                                                                                             | Notes                                                     |\n| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |\n| **Railway**    | [![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/4kqQ_I?referralCode=meysam)                                                                      | Recommended for beginners                                 |\n| **Render**     | [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/meysam81/parse-dmarc)                               | Free tier available                                       |\n| **Koyeb**      | [![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)][koyeb-1click]                                                                                          | Global edge deployment. Manually mount `/data` as volume. |\n| **Zeabur**     | [![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/YB3TS7?referralCode=meysam)                                                                      | Asia-Pacific optimized                                    |\n| **Northflank** | [![Deploy to Northflank](https://assets.northflank.com/deploy_to_northflank_smm_36700fb050.svg)](https://app.northflank.com/s/account/templates/new?data=693e394eb41e1e64db65187e) | Developer-focused                                         |\n\n### Self-Hosted\n\n| Provider     | Deploy                                                                                                                                              | Notes                           |\n| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |\n| **CapRover** | [![Deploy to CapRover](https://img.shields.io/badge/Deploy-CapRover-0072CE?style=for-the-badge\u0026logo=docker)](./deploy/captain-definition)           | Self-hosted PaaS                |\n| **Coolify**  | [![Deploy to Coolify](https://img.shields.io/badge/Deploy-Coolify-6B46C1?style=for-the-badge\u0026logo=docker)](./deploy/coolify.yaml)                   | Open-source Heroku alternative  |\n| **Dokploy**  | [![Deploy to Dokploy](https://img.shields.io/badge/Deploy-Dokploy-00B4D8?style=for-the-badge\u0026logo=docker)](./deploy/dokploy/)                       | Self-hosted deployment platform |\n| **Docker**   | [![Docker](https://img.shields.io/badge/Docker-Pull%20Image-2496ED?style=for-the-badge\u0026logo=docker)](https://hub.docker.com/r/meysam81/parse-dmarc) | Run anywhere                    |\n\n### Infrastructure\n\n| Provider                 | Deploy                                                                                                                                             | Notes                |\n| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\n| **DigitalOcean Droplet** | [![Deploy to DigitalOcean](https://img.shields.io/badge/Deploy-DigitalOcean-0080FF?style=for-the-badge\u0026logo=digitalocean)](./deploy/digitalocean/) | VM with Packer image |\n\n\u003e **Note**: All deployments require IMAP credentials. See [Configuration](#configuration-options) for details on setting up Gmail, Outlook, or other email providers.\n\n## Why Do I Need This?\n\n**DMARC** (Domain-based Message Authentication, Reporting \u0026 Conformance) helps protect your domain from email spoofing and phishing. When you enable DMARC on your domain, email providers like Gmail, Outlook, and Yahoo send you **aggregate reports** showing:\n\n- Who's sending email claiming to be from your domain\n- Which emails passed or failed authentication (SPF/DKIM)\n- How many emails were sent, and from which IP addresses\n- Whether malicious actors are trying to impersonate your domain\n\n**The Problem:** These reports arrive as compressed XML attachments in your inbox - nearly impossible to read or analyze manually.\n\n**The Solution:** Parse DMARC automatically fetches these reports from your inbox, parses them, and displays everything in a beautiful dashboard. All in a single 14MB Docker image.\n\n## Features\n\n- 📧 Auto-fetches reports from any IMAP inbox (Gmail, Outlook, etc.)\n- 📊 Beautiful dashboard with real-time statistics\n- 🔍 See exactly who's sending email as your domain\n- 🔧 Built-in DNS record generator for easy DMARC setup\n- 📦 Single binary - no databases to install, no complex setup\n- 🚀 Tiny 14MB Docker image\n- 🔒 Secure TLS support\n- 🌙 Dark mode support\n\n## Installation\n\n### Homebrew (macOS/Linux)\n\n```bash\nbrew tap meysam81/tap\nbrew install parse-dmarc\n```\n\n### Docker\n\n```bash\ndocker pull meysam81/parse-dmarc\n```\n\n### Binary Downloads\n\nDownload pre-built binaries from the [Releases page](https://github.com/meysam81/parse-dmarc/releases).\n\n## Quick Start\n\n### Step 1: Set Up DNS to Receive DMARC Reports\n\n**This is the most important step!** Without this, you won't receive any reports to analyze.\n\nAdd a DMARC TXT record to your domain's DNS:\n\n```\nName: _dmarc.yourdomain.com\nType: TXT\nValue: v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com\n```\n\n**What this means:**\n\n- `p=none` - Monitor only (don't block emails yet)\n- `rua=mailto:dmarc@yourdomain.com` - Send aggregate reports to this email address\n\n**Important:** Replace `dmarc@yourdomain.com` with an actual email inbox you control. This is where Gmail, Outlook, Yahoo, etc. will send your DMARC reports.\n\n**DNS Examples:**\n\n- **Cloudflare:** DNS \u003e Add record \u003e Type: TXT, Name: `_dmarc`, Content: `v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com`\n- **Google Domains:** DNS \u003e Custom records \u003e TXT, Name: `_dmarc`, Data: `v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com`\n- **AWS Route53:** Create record \u003e Type: TXT, Name: `_dmarc.yourdomain.com`, Value: `\"v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com\"`\n\nReports typically start arriving within 24-48 hours.\n\n### Step 2: Run Parse DMARC with Docker\n\n**Run the container:**\n\n```bash\ndocker run -d \\\n  --name parse-dmarc \\\n  -p 8080:8080 \\\n  -e IMAP_HOST=imap.gmail.com \\\n  -e IMAP_PORT=993 \\\n  -e IMAP_USERNAME=your-email@gmail.com \\\n  -e IMAP_PASSWORD=your-app-password \\\n  -v parse-dmarc:/data \\\n  meysam81/parse-dmarc\n```\n\n**For Gmail users:** You'll need an [App Password](https://support.google.com/accounts/answer/185833), not your regular Gmail password.\n\n**Access the dashboard:** Open `http://localhost:8080` in your browser.\n\n## What You'll See\n\nOnce DMARC reports start arriving and Parse DMARC processes them, your dashboard will show:\n\n- **Total messages** analyzed across all reports\n- **DMARC compliance rate** (SPF/DKIM pass rates)\n- **Top sending sources** (IP addresses and organizations sending as your domain)\n- **Authentication results** (which emails passed/failed SPF and DKIM)\n- **Policy actions** (how receiving servers handled your email)\n\nThis helps you:\n\n- Verify your legitimate email services are properly configured\n- Detect unauthorized use of your domain\n- Gradually move from monitoring (`p=none`) to enforcement (`p=quarantine` or `p=reject`)\n\n## Configuration Options\n\n### IMAP Settings for Common Providers\n\n**Gmail:**\n\n```json\n{\n  \"host\": \"imap.gmail.com\",\n  \"port\": 993,\n  \"username\": \"your-email@gmail.com\",\n  \"password\": \"your-app-password\",\n  \"use_tls\": true\n}\n```\n\nRequires [App Password](https://support.google.com/accounts/answer/185833)\n\n**Outlook/Office 365:**\n\n```json\n{\n  \"host\": \"outlook.office365.com\",\n  \"port\": 993,\n  \"username\": \"your-email@outlook.com\",\n  \"password\": \"your-password\",\n  \"use_tls\": true\n}\n```\n\n**Generic IMAP:**\nMost providers use port `993` with TLS. Check your provider's documentation.\n\n### Command Line Options\n\n```bash\n# Fetch once and exit (useful for cron jobs)\ndocker exec parse-dmarc ./parse-dmarc -fetch-once\n\n# Serve dashboard only (no fetching)\ndocker exec parse-dmarc ./parse-dmarc -serve-only\n\n# Custom fetch interval (in seconds, default 300)\ndocker exec parse-dmarc ./parse-dmarc -fetch-interval=600\n```\n\n## Frequently Asked Questions\n\n**Q: I'm not receiving any reports. What's wrong?**\n\nA: Check these things in order:\n\n1. Did you add the `_dmarc` TXT record to your DNS? (Use a DNS checker like `dig _dmarc.yourdomain.com TXT`)\n2. Wait 24-48 hours - reports aren't instant\n3. Is your domain sending/receiving email? No email = no reports\n4. Check your IMAP credentials are correct in `config.json`\n\n**Q: Do I need SPF and DKIM set up first?**\n\nA: No! DMARC reports will show you whether SPF and DKIM are passing or failing, which helps you configure them correctly.\n\n**Q: What should my DMARC policy be?**\n\nA: Start with `p=none` (monitoring only). After reviewing reports and fixing any issues, gradually move to `p=quarantine` and then `p=reject`.\n\n**Q: How much email traffic do I need?**\n\nA: Any amount works. Even small domains with a few emails per day will receive useful reports.\n\n**Q: Can I use a Gmail account to receive reports?**\n\nA: Yes! Create a dedicated Gmail like `dmarc@yourdomain.com`, forward it to your personal Gmail if needed, and use Gmail's IMAP settings.\n\n## Advanced\n\n### Building from Source\n\n```bash\ngit clone https://github.com/meysam81/parse-dmarc.git\ncd parse-dmarc\njust install-deps\njust build\n./bin/parse-dmarc -config=config.json\n```\n\n### Docker Compose\n\nSee [`compose.yml`](./compose.yml) for Docker Compose configuration.\n\n### API Endpoints\n\n- `GET /api/statistics` - Dashboard statistics\n- `GET /api/reports` - List of reports (paginated)\n- `GET /api/reports/:id` - Detailed report view\n- `GET /api/top-sources` - Top sending source IPs\n- `GET /metrics` - Prometheus metrics endpoint\n\n## Prometheus Metrics \u0026 Grafana Integration\n\nParse DMARC includes production-ready Prometheus metrics for monitoring and alerting. Metrics are enabled by default and exposed at `/metrics`.\n\n### Available Metrics\n\n#### Build Information\n\n| Metric                   | Type  | Description                                     |\n| ------------------------ | ----- | ----------------------------------------------- |\n| `parse_dmarc_build_info` | Gauge | Build information (version, commit, build_date) |\n\n#### Report Processing\n\n| Metric                                             | Type      | Description                                 |\n| -------------------------------------------------- | --------- | ------------------------------------------- |\n| `parse_dmarc_reports_fetched_total`                | Counter   | Total DMARC report emails fetched from IMAP |\n| `parse_dmarc_reports_parsed_total`                 | Counter   | Total DMARC reports successfully parsed     |\n| `parse_dmarc_reports_stored_total`                 | Counter   | Total DMARC reports stored in database      |\n| `parse_dmarc_reports_parse_errors_total`           | Counter   | Total parse errors                          |\n| `parse_dmarc_reports_store_errors_total`           | Counter   | Total storage errors                        |\n| `parse_dmarc_reports_attachments_total`            | Counter   | Total attachments processed                 |\n| `parse_dmarc_reports_fetch_duration_seconds`       | Histogram | Duration of fetch operations                |\n| `parse_dmarc_reports_last_fetch_timestamp_seconds` | Gauge     | Unix timestamp of last successful fetch     |\n| `parse_dmarc_reports_fetch_cycles_total`           | Counter   | Total fetch cycles executed                 |\n| `parse_dmarc_reports_fetch_errors_total`           | Counter   | Total fetch cycle errors                    |\n\n#### IMAP Connection\n\n| Metric                                         | Type      | Labels | Description                              |\n| ---------------------------------------------- | --------- | ------ | ---------------------------------------- |\n| `parse_dmarc_imap_connections_total`           | Counter   | status | IMAP connection attempts (success/error) |\n| `parse_dmarc_imap_connection_duration_seconds` | Histogram |        | IMAP connection establishment duration   |\n\n#### DMARC Statistics\n\n| Metric                                       | Type  | Description                       |\n| -------------------------------------------- | ----- | --------------------------------- |\n| `parse_dmarc_dmarc_reports_total`            | Gauge | Total reports in database         |\n| `parse_dmarc_dmarc_messages_total`           | Gauge | Total messages across all reports |\n| `parse_dmarc_dmarc_compliant_messages_total` | Gauge | Total DMARC-compliant messages    |\n| `parse_dmarc_dmarc_compliance_rate`          | Gauge | Overall compliance rate (0-100)   |\n| `parse_dmarc_dmarc_unique_source_ips`        | Gauge | Number of unique source IPs       |\n| `parse_dmarc_dmarc_unique_domains`           | Gauge | Number of unique domains          |\n\n#### Per-Domain/Org Metrics\n\n| Metric                                        | Type  | Labels      | Description                  |\n| --------------------------------------------- | ----- | ----------- | ---------------------------- |\n| `parse_dmarc_dmarc_messages_by_domain`        | Gauge | domain      | Messages per domain          |\n| `parse_dmarc_dmarc_compliance_rate_by_domain` | Gauge | domain      | Compliance rate per domain   |\n| `parse_dmarc_dmarc_reports_by_org`            | Gauge | org_name    | Reports per organization     |\n| `parse_dmarc_dmarc_messages_by_disposition`   | Gauge | disposition | Messages by disposition type |\n\n#### Authentication Results\n\n| Metric                           | Type  | Labels | Description                       |\n| -------------------------------- | ----- | ------ | --------------------------------- |\n| `parse_dmarc_dmarc_spf_results`  | Gauge | result | SPF authentication result counts  |\n| `parse_dmarc_dmarc_dkim_results` | Gauge | result | DKIM authentication result counts |\n\n#### HTTP Server\n\n| Metric                                      | Type      | Labels               | Description                |\n| ------------------------------------------- | --------- | -------------------- | -------------------------- |\n| `parse_dmarc_http_requests_total`           | Counter   | method, path, status | Total HTTP requests        |\n| `parse_dmarc_http_request_duration_seconds` | Histogram | method, path         | HTTP request duration      |\n| `parse_dmarc_http_requests_in_flight`       | Gauge     |                      | Current in-flight requests |\n\n#### Go Runtime (Built-in)\n\nStandard Go runtime metrics are also exposed:\n\n- `go_goroutines` - Number of goroutines\n- `go_memstats_*` - Memory statistics\n- `go_gc_*` - Garbage collection metrics\n- `process_*` - Process metrics (CPU, memory, file descriptors)\n\n### Disabling Metrics\n\nTo disable the metrics endpoint:\n\n```bash\n# Command line\n./parse-dmarc --metrics=false\n\n# Environment variable\nexport PARSE_DMARC_METRICS=false\n\n# Docker\ndocker run -e PARSE_DMARC_METRICS=false meysam81/parse-dmarc\n```\n\n### Prometheus Configuration\n\nAdd Parse DMARC to your `prometheus.yml`:\n\n```yaml\nscrape_configs:\n  - job_name: \"parse-dmarc\"\n    static_configs:\n      - targets: [\"parse-dmarc:8080\"]\n    scrape_interval: 30s\n    metrics_path: /metrics\n```\n\nFor Kubernetes with ServiceMonitor (Prometheus Operator):\n\n```yaml\napiVersion: monitoring.coreos.com/v1\nkind: ServiceMonitor\nmetadata:\n  name: parse-dmarc\n  labels:\n    app: parse-dmarc\nspec:\n  selector:\n    matchLabels:\n      app: parse-dmarc\n  endpoints:\n    - port: http\n      path: /metrics\n      interval: 30s\n```\n\n### Grafana Dashboard\n\nA production-ready Grafana dashboard is included in `grafana/dashboard.json`.\n\n#### Import Manually\n\n1. In Grafana, go to **Dashboards** \u003e **Import**\n2. Upload `grafana/dashboard.json` or paste its contents\n3. Select your Prometheus datasource\n4. Click **Import**\n\n#### Provision Automatically (Recommended for Production)\n\n```bash\n# Copy dashboard to Grafana dashboards directory\ncp grafana/dashboard.json /var/lib/grafana/dashboards/parse-dmarc/\n\n# Copy provisioning config\ncp grafana/provisioning.yaml /etc/grafana/provisioning/dashboards/parse-dmarc.yaml\n\n# Restart Grafana or wait for it to pick up changes\nsystemctl restart grafana-server\n```\n\n#### Dashboard Variables\n\n| Variable     | Purpose                        |\n| ------------ | ------------------------------ |\n| `datasource` | Prometheus datasource to query |\n| `job`        | Filter by Prometheus job label |\n| `instance`   | Filter by instance(s)          |\n| `domain`     | Filter by monitored domain(s)  |\n\n#### Dashboard Sections\n\n| Section                            | What It Shows                                                             |\n| ---------------------------------- | ------------------------------------------------------------------------- |\n| **Overview - Golden Signals**      | Compliance rate, total messages, reports count, time since last fetch     |\n| **DMARC Authentication Results**   | SPF/DKIM pass rates, disposition breakdown, per-domain compliance         |\n| **Report Sources \u0026 Organizations** | Top reporting organizations (Google, Microsoft, etc.), messages by domain |\n| **IMAP \u0026 Fetch Operations**        | Connection health, fetch cycle monitoring, latency heatmaps               |\n| **Error Tracking**                 | Parse errors, storage errors, fetch failures                              |\n| **HTTP Server**                    | Request rates, latency percentiles, error rates                           |\n| **Go Runtime**                     | Goroutines, memory usage, GC stats, CPU usage                             |\n\n#### Example Grafana Panels\n\n**Compliance Rate Gauge:**\n\n```promql\nparse_dmarc_dmarc_compliance_rate\n```\n\n**Messages Over Time:**\n\n```promql\nrate(parse_dmarc_dmarc_messages_total[5m])\n```\n\n**Compliance Rate by Domain:**\n\n```promql\nparse_dmarc_dmarc_compliance_rate_by_domain\n```\n\n**SPF/DKIM Pass Rate:**\n\n```promql\n# SPF Pass Rate\nparse_dmarc_dmarc_spf_results{result=\"pass\"} / ignoring(result) sum(parse_dmarc_dmarc_spf_results) * 100\n\n# DKIM Pass Rate\nparse_dmarc_dmarc_dkim_results{result=\"pass\"} / ignoring(result) sum(parse_dmarc_dmarc_dkim_results) * 100\n```\n\n**Fetch Success Rate:**\n\n```promql\n1 - (rate(parse_dmarc_reports_fetch_errors_total[1h]) / rate(parse_dmarc_reports_fetch_cycles_total[1h]))\n```\n\n**IMAP Connection Health:**\n\n```promql\nrate(parse_dmarc_imap_connections_total{status=\"success\"}[5m]) /\n(rate(parse_dmarc_imap_connections_total{status=\"success\"}[5m]) + rate(parse_dmarc_imap_connections_total{status=\"error\"}[5m]))\n```\n\n**HTTP Request Latency (p95):**\n\n```promql\nhistogram_quantile(0.95, rate(parse_dmarc_http_request_duration_seconds_bucket[5m]))\n```\n\n**Reports by Organization:**\n\n```promql\ntopk(10, parse_dmarc_dmarc_reports_by_org)\n```\n\n#### Alerting Rules\n\nExample Prometheus alerting rules:\n\n```yaml\ngroups:\n  - name: parse-dmarc\n    rules:\n      - alert: DMARCComplianceLow\n        expr: parse_dmarc_dmarc_compliance_rate \u003c 90\n        for: 1h\n        labels:\n          severity: warning\n        annotations:\n          summary: \"DMARC compliance rate is below 90%\"\n          description: \"Current compliance rate: {{ $value }}%\"\n\n      - alert: DMARCFetchFailures\n        expr: rate(parse_dmarc_reports_fetch_errors_total[15m]) \u003e 0\n        for: 30m\n        labels:\n          severity: critical\n        annotations:\n          summary: \"Parse DMARC fetch failures detected\"\n          description: \"IMAP fetch operations are failing\"\n\n      - alert: IMAPConnectionErrors\n        expr: rate(parse_dmarc_imap_connections_total{status=\"error\"}[5m]) \u003e 0\n        for: 10m\n        labels:\n          severity: warning\n        annotations:\n          summary: \"IMAP connection errors detected\"\n          description: \"Check IMAP credentials and server connectivity\"\n\n      - alert: NoRecentFetch\n        expr: time() - parse_dmarc_reports_last_fetch_timestamp_seconds \u003e 600\n        for: 5m\n        labels:\n          severity: warning\n        annotations:\n          summary: \"No recent DMARC report fetch\"\n          description: \"Last fetch was {{ humanizeDuration $value }} ago\"\n```\n\n### Docker Compose with Prometheus \u0026 Grafana\n\nComplete monitoring stack:\n\n```yaml\nversion: \"3.8\"\n\nservices:\n  parse-dmarc:\n    image: meysam81/parse-dmarc\n    ports:\n      - \"8080:8080\"\n    volumes:\n      - ./config.json:/app/config.json\n      - ./data:/data\n\n  prometheus:\n    image: prom/prometheus\n    ports:\n      - \"9090:9090\"\n    volumes:\n      - ./prometheus.yml:/etc/prometheus/prometheus.yml\n    command:\n      - \"--config.file=/etc/prometheus/prometheus.yml\"\n\n  grafana:\n    image: grafana/grafana\n    ports:\n      - \"3000:3000\"\n    environment:\n      - GF_SECURITY_ADMIN_PASSWORD=admin\n    volumes:\n      - grafana-data:/var/lib/grafana\n\nvolumes:\n  grafana-data:\n```\n\nWith `prometheus.yml`:\n\n```yaml\nglobal:\n  scrape_interval: 15s\n\nscrape_configs:\n  - job_name: \"parse-dmarc\"\n    static_configs:\n      - targets: [\"parse-dmarc:8080\"]\n```\n\nAccess:\n\n- Parse DMARC Dashboard: http://localhost:8080\n- Prometheus: http://localhost:9090\n- Grafana: http://localhost:3000 (admin/admin)\n\n### Why Parse DMARC vs ParseDMARC?\n\nThis project is inspired by [ParseDMARC](https://github.com/domainaware/parsedmarc) but built for simplicity:\n\n- **Single 14MB binary** vs Python + Elasticsearch + Kibana stack\n- **Built-in dashboard** vs external visualization tools\n- **SQLite** vs Elasticsearch (no JVM required)\n- **Zero dependencies** vs complex setup\n\n## Contributing\n\nIssues and pull requests are welcome! Please check the [issues page](https://github.com/meysam81/parse-dmarc/issues).\n\n## License\n\nApache-2.0 - see [LICENSE](LICENSE) for details.\n\n---\n\n**Found this useful? Star the repo!** ⭐\n\n[koyeb-1click]: https://app.koyeb.com/deploy?name=parse-dmarc\u0026type=docker\u0026image=docker.io%2Fmeysam81%2Fparse-dmarc%3Alatest\u0026regions=fra\u0026env%5BDATABASE_PATH%5D=%2Fdata%2Fdb.sqlite\u0026env%5BIMAP_HOST%5D=\u0026env%5BIMAP_MAILBOX%5D=INBOX\u0026env%5BIMAP_PASSWORD%5D=\u0026env%5BIMAP_PORT%5D=993\u0026env%5BIMAP_USERNAME%5D=\u0026env%5BIMAP_USE_TLS%5D=true\u0026env%5BSERVER_PORT%5D=8080\u0026ports=8080%3Bhttp%3B%2F\u0026hc_protocol%5B8080%5D=http\u0026hc_grace_period%5B8080%5D=5\u0026hc_interval%5B8080%5D=30\u0026hc_restart_limit%5B8080%5D=3\u0026hc_timeout%5B8080%5D=5\u0026hc_path%5B8080%5D=%2Fapi%2Fstatistics\u0026hc_method%5B8080%5D=get\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeysam81%2Fparse-dmarc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeysam81%2Fparse-dmarc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeysam81%2Fparse-dmarc/lists"}