Mail queue viewer - A terminal user interface for inspecting messages in the Postfix mail queue.
Find a file
Pierre-Olivier Mercier 3916c49a0c Add h keybinding to toggle hold/release via postsuper -h/-H
Preserves the ! suffix from postqueue -p output to track hold status
in QueueEntry, and optimistically toggles it in the UI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 20:00:51 +07:00
.gitignore Add .gitignore to exclude binary 2026-03-29 19:33:21 +07:00
go.mod Initial commit 2026-03-29 19:33:21 +07:00
go.sum Initial commit 2026-03-29 19:33:21 +07:00
item.go Initial commit 2026-03-29 19:33:21 +07:00
LICENSE Initial commit 2026-03-29 19:33:21 +07:00
main.go Initial commit 2026-03-29 19:33:21 +07:00
message.go Prompt for filename when saving a message 2026-03-29 19:33:31 +07:00
model.go Add h keybinding to toggle hold/release via postsuper -h/-H 2026-03-29 20:00:51 +07:00
msgs.go Add h keybinding to toggle hold/release via postsuper -h/-H 2026-03-29 20:00:51 +07:00
queue.go Add h keybinding to toggle hold/release via postsuper -h/-H 2026-03-29 20:00:51 +07:00
README.md Add h keybinding to toggle hold/release via postsuper -h/-H 2026-03-29 20:00:51 +07:00
styles.go Show delivery failure reason in message view header 2026-03-29 19:48:55 +07:00

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+
  • postqueue and postcat in $PATH (i.e. Postfix installed)
  • Run as a user with read access to the Postfix queue
  • Optional: w3m for 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
F Flush queue (postqueue -f)
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
h Toggle hold (postsuper -h/-H)
D Delete message (postsuper -d)
F Requeue message (postsuper -r)
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

  1. Runs postqueue -p and parses the output to build the queue list.
  2. For each entry, fetches the subject via postcat -qh MSGID in parallel.
  3. On Enter, loads the full message with postcat -qbh MSGID and renders it in a scrollable viewport.
  4. MIME parsing is done in pure Go (mime/multipart, mime/quotedprintable) — no external dependencies for message decoding.
  5. 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