Mail queue viewer - A terminal user interface for inspecting messages in the Postfix mail queue.
- Go 100%
Display the postqueue failure reason right-aligned in red on the message header line so it's immediately visible when viewing a message. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| item.go | ||
| LICENSE | ||
| main.go | ||
| message.go | ||
| model.go | ||
| msgs.go | ||
| queue.go | ||
| README.md | ||
| styles.go | ||
mqv — Mail Queue Viewer
A quick-and-dirty TUI for browsing the Postfix deferred queue, built mutt-style.
I wanted this tool for a long time. Claude finally made it happen.
What it does
mqv gives you a keyboard-driven terminal interface to inspect your Postfix mail queue — read messages, browse attachments, save EML files — without leaving the terminal.
ABC1234 Mar 29 10:00 sender@example.com Subject line here
DEF5678 Mar 28 14:32 other@example.com Another message
...
Requirements
- Go 1.21+
postqueueandpostcatin$PATH(i.e. Postfix installed)- Run as a user with read access to the Postfix queue
- Optional:
w3mfor rendering HTML parts as plain text
Install
git clone https://github.com/nemunaire/mqv
cd mqv
go build -o mqv .
./mqv
Or install directly:
go install github.com/nemunaire/mqv@latest
Screens & keybindings
Queue list
| Key | Action |
|---|---|
↑ / ↓ |
Navigate messages |
Enter |
Open message |
r |
Refresh queue |
q |
Quit |
Subjects are fetched lazily in parallel via postcat as the list loads; a progress bar tracks completion.
Message view
| Key | Action |
|---|---|
↑↓ / Space / PgUp / PgDn |
Scroll |
H |
Toggle full headers / short headers |
s |
Save raw EML to ~/QUEUEID.eml |
v |
Browse MIME parts |
q |
Back to queue list |
Headers are RFC 2047 decoded. The body is decoded from quoted-printable or base64. HTML parts are rendered via w3m if available, otherwise shown as-is.
MIME parts browser
| Key | Action |
|---|---|
↑↓ / j/k |
Navigate parts |
Enter |
View text part inline |
s |
Save part to file (prompts for name) |
q / Esc |
Back to message view |
Part view
| Key | Action |
|---|---|
↑↓ / Space / PgUp / PgDn |
Scroll |
q / Esc |
Back to parts list |
How it works
- Runs
postqueue -pand parses the output to build the queue list. - For each entry, fetches the subject via
postcat -qh MSGIDin parallel. - On
Enter, loads the full message withpostcat -qbh MSGIDand renders it in a scrollable viewport. - MIME parsing is done in pure Go (
mime/multipart,mime/quotedprintable) — no external dependencies for message decoding. - Charset decoding handles ISO-8859-1, Windows-1252, and anything in the IANA index via
golang.org/x/text.
Stack
- bubbletea — Elm-architecture TUI framework
- bubbles — list, viewport, progress, textinput components
- lipgloss — terminal styling
- x/text — charset decoding
License
MIT