CLI-Anything Bundle #46 — Mail & MTA Trust Recon Pack
Four NEW agent-native read-only harnesses that census the entire
mail trust surface of a Unix box the way the MTA itself consumes it —
parameter values and pipe commands never printed, the compiled aliases
database never opened, honest absence carried as truth.
- postfixpeek — main.cf parameter census: the
LAST-WINS assignment law made visible (every parameter assigned more
than once is a DUPLICATE_PARAMETER finding naming the winner line),
23-row key-parameter presence set (alias maps, TLS, sasl, relay,
size),
$reference resolution as data rows only,
world/group-writable + owner-mismatch hygiene, unparsable-line law.
Parameter VALUES are never printed.
- masterpeek — master.cf service census: the
service table (name/type/flags/command), CHROOT_YES findings per
service (chrooted services need /var/spool/postfix plumbing),
transport law incl. unix-dgram (the modern postlog transport),
private-flag and maxproc histograms, disabled-service rows (only
full 8-field comment bodies count), <8-field UNPARSABLE_LINE law.
Command argument text is never printed.
- aliaspeek — aliases(5) target census: the full
target grammar (address, /file append, |pipe findings with command
text never printed, :include: resolved ONE hop with
missing/not-file/unreadable/world-writable laws and nested-include
stubs), STAT-ONLY STALE_ALIASES_DB + MISSING_ALIASES_DB drift law
(the .db is statted, never opened), duplicate keys as data.
- forwardpeek — per-account ~/.forward census:
statutory posture laws (FORWARD_OWNER_MISMATCH vs the account's own
uid, world/group-writable, unreadable, FORWARD_SYMLINK with
follow-stat mode/owner law, FORWARD_DANGLING), the same target grammar
one hop, min-uid/--all account census, homes data truth, honest
zero-forwards rc0. Pipe command text never printed.
Install (no pip required)
cd <tool>/agent-harness
python3 -m cli_anything.<tool> --json
Or install one harness into a venv:
pip install ./postfixpeek/agent-harness
Exit codes (all four tools)
0 clean / no findings
4 findings present
6 nothing readable
2 usage error
Trust laws
- Zero subprocesses, zero network, zero writes — every battery
asserts the source laws.
- Parameter VALUES and pipe COMMAND TEXT never leave the process.
- The aliases .db is stat-only — never opened, never parsed.
- Every report: summary + findings + data_rows + rc, human and
--json.
Battery truth
219 executed-assert checks per sweep (postfixpeek 53 + masterpeek
51 + aliaspeek 62 + forwardpeek 53), fired twice from the kit and
re-fired clean-room from this exact shipping zip — 0 failed every
source. Defect ledger closed before green; zero test weakening.
License: MIT (see LICENSE in the zip). Apache-family stdlib-only
harness — Python 3, no third-party dependencies.