skrzynka serve
Open the fleet database, read every declared mailbox as its provider reports new mail, and serve Skrzynka's loopback HTTP API in the foreground.
Invocation#
skrzynka serve --bind <SOCKET>Purpose#
Open the fleet database, read every declared mailbox as its provider reports new mail, and serve Skrzynka's loopback HTTP API in the foreground.
Inputs and options#
| Input or option | Required | Meaning |
|---|---|---|
--bind <SOCKET> | Yes | Listen address; the IP must be loopback. No address is assumed; the service declaration that runs serve names it. Missing it exits 2. |
Global options accepted on this path are --organization <ID> (required on every command except serve, version and onboarding; none is assumed), --skarbiec-bin <PATH> (default skarbiec) and --text (print results as path: value lines for people instead of JSON).
Output and state effect#
Opens the database, reconciles Skarbiec's declarations, and for each enabled mailbox imports what is waiting and then holds an IMAP IDLE (RFC 2177), reading it again the moment the provider announces new mail. No polling interval exists. A sync or IDLE failure is recorded on the mailbox (last_error_code, last_error_message) and the mailbox is watched again on the next round, which also takes up newly declared items; rounds are spaced by RFC 2177's 29-minute IDLE refresh. Binds the API listener, logs Skrzynka API ready to stderr, and remains running until shutdown.
Refusals#
NON_LOOPBACK_BIND_REFUSED:Skrzynka listens only on loopback addresses; <SOCKET> is not one.INTERNAL_ERROR:loopback API address could not be boundwhen the requested loopback socket cannot be opened.DATABASE_SCHEMA_UNSUPPORTED:database schema <VERSION> is not supported by this build (expected at most <SUPPORTED>).