Overview
Postfix Insights is a self-hosted FastAPI app with two surfaces over the same Postfix mail-log data.
Two surfaces
Section titled “Two surfaces”- 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.
- 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.
Where it runs
Section titled “Where it runs”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.
How it is built
Section titled “How it is built”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.
- Quick start: install with Docker in four commands.
- Configuration: the environment variables that matter.
- Remote logs (SSHFS): search remote mail servers without copying files.
- Deployment: pick a topology and run exactly one instance.
The canonical source and full reference live in the GitHub repository.