Mailbox service
knockd mailbox is a single Go HTTP service backed by one bbolt database. It delivers opaque QoreSeal messages between requesters, approvers, Doors, and auditors without holding decryption keys or authorization power.
Start the Mailbox
Section titled “Start the Mailbox”bin/knockd mailbox \ --listen 127.0.0.1:8180 \ --origin http://127.0.0.1:8180 \ --state "$HOME/.config/knock/mailbox/mailbox.db"--listen: loopback HTTP bind address (defaults to127.0.0.1:8180).--origin: public scheme and host bound into challenge-response signatures (defaults tohttp://127.0.0.1:8180).--state: path to thebboltdatabase inside a0700directory; the file itself must remain0600.
Remote deployment behind TLS
Section titled “Remote deployment behind TLS”By default, knockd mailbox listens on loopback. When requesters, approvers, and the Door run on separate machines:
- Place
knockd mailboxbehind an HTTPS reverse proxy (such as Caddy or Nginx) or forward the loopback port over an operator SSH tunnel. - Set
--originto the exact HTTPS origin clients pass indoor.jsonand--mailbox(for examplehttps://mailbox.example.org). Authentication challenges fail closed if the signed origin mismatches.
Bounds and retention
Section titled “Bounds and retention”- Stored messages have a bounded lifetime (
15 minutesmax retention) and bounded payload size (MaxEnvelope). - Inbox reads return bounded pages (
16messages per page,64queued messages max per inbox) and require account-bound PQ challenge signatures (POST /v1/auth/challenge). - The Mailbox accepts and serves signed public recipient cards (
GET/PUT /v1/cards/{account}); clients always verify signatures and Diana key bindings independently rather than trusting the directory.
What the Mailbox can and cannot do
Section titled “What the Mailbox can and cannot do”- Cannot read payloads: requests, reasons, Entry Passes, connection responses, host status updates, and audit Receipts are all QoreSeal encrypted before leaving client devices.
- Cannot approve or issue access:
knockdverifies signatures and Diana policy independently; a spoofed Mailbox response fails authentication. - Can observe metadata: as a network relay, the Mailbox sees routing
qor1...accounts, message sizes, delivery timing, and client IP addresses. It can delay, drop, or duplicate messages, so idempotency checks and request deadlines handle replay and loss safely.