postsleuth

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT

README

postsleuth logo

postsleuth

Why isn't Postfix delivering? postsleuth reads the queue (postqueue -j), the mail log and DNS, groups every stuck message by why it is stuck, and tells you what to do next. It works as a CLI and as an MCP server, so an AI agent can investigate a mail server without being able to touch it.

postsleuth doctor on a server with a Gmail rate limit, an Outlook blocklist and a dead host

Demo uses generated snapshot data (testdata/gen.py) via --queue-file / --log.

Install

go install github.com/Blackman99/postsleuth/cmd/postsleuth@latest

or grab a binary for Linux, macOS or Windows from Releases.

Use

postsleuth doctor                  # queue + qshape + log + SPF/DKIM/DMARC/PTR, with next steps
postsleuth queue --domain .outlook.com
postsleuth shape --by sender       # who filled the deferred queue
postsleuth trace bob@example.org   # one message, start to finish
postsleuth dns example.com --ip 203.0.113.7

Postfix in a container or on another box: --wrap "docker exec -i mailserver" or run it over ssh.

MCP

{"mcpServers": {"postsleuth": {"command": "postsleuth", "args": ["mcp"]}}}

All tools are read-only. Requeue, flush, hold and delete exist only when the server is started with --allow-mutations, and each call still needs confirm: true.

Docs · Website · Goal · Roadmap · MIT

Directories

Path Synopsis
cmd
postsleuth command
Command postsleuth diagnoses Postfix mail delivery: queue, qshape, mail log, SPF/DKIM/DMARC/PTR.
Command postsleuth diagnoses Postfix mail delivery: queue, qshape, mail log, SPF/DKIM/DMARC/PTR.
internal
dnsauth
Package dnsauth checks the DNS records that decide whether other mail servers accept your mail: MX, SPF, DKIM, DMARC and PTR/FCrDNS.
Package dnsauth checks the DNS records that decide whether other mail servers accept your mail: MX, SPF, DKIM, DMARC and PTR/FCrDNS.
doctor
Package doctor ties the queue, log, config and DNS checks together.
Package doctor ties the queue, log, config and DNS checks together.
maillog
Package maillog parses Postfix syslog / journald / maillog_file lines and aggregates delivery outcomes per domain.
Package maillog parses Postfix syslog / journald / maillog_file lines and aggregates delivery outcomes per domain.
mcpserver
Package mcpserver exposes postsleuth over the Model Context Protocol (stdio).
Package mcpserver exposes postsleuth over the Model Context Protocol (stdio).
postfix
Package postfix runs Postfix command-line tools (postqueue, postconf, postsuper).
Package postfix runs Postfix command-line tools (postqueue, postconf, postsuper).
queue
Package queue parses `postqueue -j` output and summarises the Postfix queue, including a qshape-style age-by-domain matrix.
Package queue parses `postqueue -j` output and summarises the Postfix queue, including a qshape-style age-by-domain matrix.
reason
Package reason normalises and classifies Postfix delivery failure texts (delay_reason in the queue, status=deferred/bounced text in the log).
Package reason normalises and classifies Postfix delivery failure texts (delay_reason in the queue, status=deferred/bounced text in the log).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL