Skip to content

Overview

Postfix Insights is a self-hosted FastAPI app with two surfaces over the same Postfix mail-log data.

  1. Diagnostic search finds delivery records by recipient, domain, or subject, with an optional date range. Matched lines are parsed and correlated by queue ID into structured email records with per-recipient status, shown raw and formatted. Results stream to the browser over Server-Sent Events.
  2. Delivery-health dashboard (/stats) aggregates volume, bounce and defer rate, SLA, domain mix, slow domains, DSN breakdown, and calendar/heatmap trends. A background scanner rolls log data into hourly, daily, and weekly tiers in a libSQL store so trends stay fast across months of mail.

It runs against local logs or SSHFS-mounted remote logs, on the box that already collects the mail (the co-logged mail.log). No agents, no log shipping, no external store.

Server-rendered Jinja2, htmx for fragment swaps, Alpine for client reactivity, and ECharts for the dashboard. All third-party assets are vendored, with no runtime CDN. Packaged as a Docker image with a sqld (libSQL) sidecar for the stats database.

The canonical source and full reference live in the GitHub repository.