Skip to content

v1.7.0

Choose a tag to compare

@github-actions github-actions released this 14 Oct 17:02
· 160 commits to main since this release
b309cdc

MINOR, and one entry is a change to a DEFAULT that widens what an agent credential can
read.
Read that first; everything else is additive.

An agent credential now reads the mail addressed to the humans on the deployment (#718)

This is on by default and there is no key that turns it off. If you give an agent a
per-identity registry entry in POSTERN_SEND_IDENTITIES whose scopes include read,
that credential can read mail addressed to every address on the deployment, not only its
own. A self-hoster inherits this on first run.

It is deliberate. Postern is email for agents AND humans, and an agent that cannot read the
humans' mail does not deliver the product; an agent asked to find last month's invoice has
to be able to find it in the mailbox it was delivered to. The capability is documented in
README's agent section and in DEPLOY.md rather than buried here.

One boundary did NOT move, and one is narrower than it looks:

  • The widening follows the CREDENTIAL, not the person, and this is the trap. It keys on a
    registry Bearer and never on a session cookie, which is correct, but cookie sessions
    exist only when you set WEBMAIL_AUTH_BACKEND = "native", and unset is the DEFAULT.

    Default webmail is BYO-token and sends Authorization: Bearer. So a human who pastes a
    read-capable registry token into webmail reads the estate: the worker sees a registry
    Bearer and cannot tell there is a browser on the other end. Being a person in a browser is
    not what scopes you. To scope someone to their own mail, give them a cookie session, or a
    token whose scopes omits read.
  • The widening is READ only. Marking read, flagging, filing, and what a reply or forward
    may quote all stay bound to the agent's own address. So an agent can read a message it
    cannot act on. That asymmetry is intentional for now; delegated read AND send with an
    audit trail is tracked separately and is where the write side belongs.

UPGRADING FROM 1.6.0: check POSTERN_SEND_IDENTITIES BEFORE you deploy. Any existing
entry whose scopes already include read widens the moment this version goes live. You add
nothing for this to take effect and nothing prompts you.

If that reach is wider than you want: an entry whose scopes omits read is refused on
every read route, and that is the supported way to run an agent that can send and cannot
read. Every read response carries identityScope, so
curl -sH "authorization: Bearer <token>" "$BASE/api/whoami" tells you what a credential
actually reaches rather than leaving you to infer it.

Every read-scoped route now states the scope it was answered under (#717)

identityScope was on GET /api/messages and GET /api/search since v1.5.0. It is now on
every read-scoped route, including the misses: GET /api/messages/{id} and its 404,
both attachment 404s, GET /api/threads/{id}, GET /api/folders, and
GET /api/recipients/recent. A scoped read previously returned count: 0, messages: []
or a 404 and said nothing about having been narrowed, so "not your mail" was
indistinguishable from "no such mail".

The 404 is still ONE answer. The refusal body is byte-identical whether an id is absent
or withheld, and both attachment refusals share one body. Nothing says "this message exists
but is not yours", because that would leak existence. The field rides on hits as well as
misses for the same reason: present only on a miss, its presence would itself be the oracle.

cursor: null on a thread read is a claim about what YOU may read, not about the thread.
Under kind: "estate" it means the whole thread; under member or role it means every
message you are allowed to see, with the rest omitted and not counted. That was true for any
bound member since role queues arrived in v1.2.0 (#425) and only now says so.

The npm MCP package does not relay this yet. @skyphusion/postern-mcp is published at
1.4.1 and carries no identityScope at all. The in-tree client that relays it rides its own
postern-mcp-v* tag and has not been cut, so an MCP caller cannot see the field even against
a 1.7.0 worker.

postern-client relays it, and gains two envelope methods (#730)

  • New: get_message_envelope() and get_folders_envelope() return
    {message, identity_scope} and {folders, identity_scope}. get_thread_page() gains
    identity_scope in its existing dict.
  • Unchanged on purpose: get_message() and get_folders() return exactly what they
    returned in 1.6.0, and now delegate to the envelope methods. A None from get_message()
    still does not prove absence under a scoped read, which is what the envelope is for.
  • CLI: postern get and postern folders emit the same stdout as 1.6.0. --envelope on
    either emits the envelope instead. postern get no longer prints a bare
    "message not found": it states the scope the miss came out of, and when the server reports
    no scope it says so rather than picking a side.

Fixed

  • The organize regression guard in inbound/smoke.mjs could not fire, because the secret
    it reads was never set, so a worker that had lost the organize scope wall would have
    passed the live smoke. It is now wired, and it runs wherever the guard token is
    configured
    : either POSTERN_SMOKE_NO_ORGANIZE_TOKEN, or the repo variable
    POSTERN_SMOKE_API_TOKEN_IS_READ_ONLY = "true" declaring your API token read-only. With
    neither set it reports its declared GAP rather than asserting anything, so a self-hoster who
    configures nothing gets the GAP and not a false pass (#692).
  • inbound/smoke.mjs published its coverage ledger only on a green exit, so one failed probe
    erased the coverage statement for everything behind it and an absent GAP line meant either
    "covered" or "never reached". Coverage is now a three-state ledger reconciled from an exit
    handler, and an unreached property prints NOT REACHED (#720).
  • The MCP organize-gate control deep-equalled a frozen tool list, so it broke on every new
    read tool while staying silent on the one thing a read-scope leak looks like. It now asserts
    the property, and a separate case fails if an organize tool carries scope: "read" (#714).
  • Five more IMAP end-to-end test classes settle the server side before the reactor check,
    removing a DirtyReactorAggregateError flake (#716).

Docs

  • The retired fleet topology (a bastion, a private VLAN, a directory host) is gone from the
    release, proxy and design docs, and from 10 files across four languages including a
    Dockerfile and imap/.env.example. Two of those lines were not merely stale but wrong:
    they asserted that per-IP throttling is blind, which is false wherever PROXY protocol is
    configured (#723, #737).
  • docs/CONTRACT.md records that surveying a thread through
    GET /api/messages?thread=<id> is not the same read as GET /api/threads/{id}, in four
    ways, two of which no response announces (#734).
  • The IMAP proxy's MIT licence is stated in NOTICE and README, and imap/LICENSE ships (#722).
  • The public demo mailbox is disclosed in the privacy and legal docs (#721).