Configuration reference
Every setting is an environment variable. Each serve setting also has a
flag with the same name in kebab case (POSTKEEP_ is
--public-url); run postkeep serve --help for the full list.
POSTKEEP_ belongs to
postkeep migrate and postkeep storage-level only.
Changing a setting shows how to change one.
Core
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
(required) | Public origin, for example https:// (no path) |
POSTKEEP_ |
32-byte key, hex or base64 (postkeep generate-key) |
|
POSTKEEP_ |
File holding the key, instead of MASTER_ |
|
POSTKEEP_ |
Comma-separated previous keys, only while rotating (see below) | |
POSTKEEP_ |
File with previous keys, one per line | |
POSTKEEP_ |
0.0.0.0:8080 |
Listen address |
POSTKEEP_ |
0 |
Seconds to keep serving after SIGINT or SIGTERM while /readyz answers 503, so load balancers stop sending requests first; a second signal ends the wait (see deployment) |
POSTKEEP_ |
sqlite:// |
sqlite:// or postgres://. For a remote PostgreSQL server, add ?sslmode=, and sslrootcert= when the provider uses a private CA |
POSTKEEP_ |
true |
Apply pending migrations at start. With false the server refuses to start while any is pending; run postkeep migrate first |
POSTKEEP_ |
(POSTKEEP_) |
Database URL postkeep migrate and postkeep storage-level use, for example a direct connection that bypasses a pooler |
POSTKEEP_ |
10 |
Most database connections this server opens at once |
POSTKEEP_ |
30 |
Seconds a request waits for a free database connection before it fails |
POSTKEEP_ |
600 |
Seconds an unused database connection stays open; 0 keeps it open |
POSTKEEP_ |
1800 |
Seconds before a database connection is replaced; 0 never replaces it |
POSTKEEP_ |
Extra Host values accepted on /mcp besides the public host, comma-separated. *.example. matches exactly one more label (a., not example. or a.). Other hosts get 403 before any token is checked |
|
POSTKEEP_ |
Extra Origin values accepted on /mcp besides the public URL’s origin, comma-separated, such as https:// for an MCP client that runs in a web page there. A request with any other Origin gets 403 before any token is checked; requests without one pass. postkeep sends no CORS headers, so a page on another origin also needs a proxy that adds them |
|
POSTKEEP_ |
info |
Log filter (tracing syntax) |
POSTKEEP_ |
text |
text or json |
POSTKEEP_ |
Address for Prometheus metrics at /metrics, such as 127.0.0.1:9091; unset serves none. Anyone who reaches it can read it: keep it private (see below) |
POSTKEEP_ uses tracing filter syntax. Directives for postkeep’s own
crates are kept as written, including span directives such as
[serve_. These crates stay capped no matter what the filter
says, because their trace or debug logs can include credentials, message
bodies or the upload bucket’s address: async_ and imap_ at
warn, rmcp at info, lettre at warn, and hyper_ and rustls
at info. The cap is a separate filter on the event’s own target,
so a directive with no target (trace, [serve_) cannot raise
those crates. A directive that names one of them, such as
async_ or rmcp::, is also dropped.
lettre only logs SMTP commands when its tracing feature is compiled;
this server does not enable that feature, and the cap still applies if it
is.
Each answered request, except /healthz and /readyz, gets one info line
from postkeep::, “answered a request”, with request_ (32
random hex digits), method (other for a method that is not one of the
nine standard ones), route (the route as the server writes it, such as
/oauth/, left out when no route serves the address),
status and ms (milliseconds until the answer’s head). A request to
/mcp that passed the token check adds principal and tenant. A tool
call adds outcome (ok, tool_ or rpc_), and tool when the
name is one of the server’s tools or of an embedding’s. Every line logged
while a request runs, a tool call’s included, has the same request_
among its spans (spans in JSON): in span itself for postkeep’s own
lines, in an outer span for a library’s, such as rmcp’s. That span,
request, has the target postkeep:: and the level error, so a
warn or error filter keeps the ids. The line never holds the query, a
value from the path, a header, a body, a tool’s arguments or result, a
token, the client’s IP address or an email address.
POSTKEEP_ turns the line off and keeps
the ids.
With POSTKEEP_ set, the server also listens on that address
and answers only GET / there, in Prometheus text format 0.0.4;
every other path is 404. Anyone who reaches that address can read it, so
bind it to 127.0.0.1 for a Prometheus on the same host, or on Fly.io to
[::]:9091 with a [metrics] section and no service on that port. It
serves:
postkeep_(counter), byhttp_ requests_ total route(the route as written, orunmatchedwhen no route serves the address) andstatus;postkeep_(histogram), the seconds until the answer’s head byhttp_ request_ duration_ seconds route, with bounds (le) of 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 1.5, 2.5, 5 and 10 seconds;postkeep_(counter), bytool_ calls_ total tool(a tool’s name, orunknown) andoutcome(ok,tool_orerror rpc_);error postkeep_(counter), byimap_ logins_ total server(icloud,fastmail,yahoo,gmailorcustom) andoutcome:ok,rejected(the password),unavailable(the server said to try later) orfailed(the network, TLS, a timeout or the protocol). A login is one per new IMAP connection with a stored password, a tool call’s (when no idle connection is pooled) or a watcher’s; sign-in checks are not counted;postkeep_(counter), bysmtp_ sends_ total serverandoutcomeas above, one per message an IMAP account sends or replies with. A send refused before it reaches the server is not counted, and neither is one the server refuses with a permanent reply other than 535, such as 550 for an unknown recipient: the recipient or the message caused it. A temporary reply, or none at all, isfailed;postkeep_(counter), bywatcher_ errors_ total provider(imap,graphorgmail): new-mail watcher runs that ended in an error, which the watcher retries. A rejected password is not one;postkeep_counts it;imap_ logins_ total{outcome= "rejected"} postkeep_(counter): new-mail watchers not started becausewatchers_ refused_ total POSTKEEP_run;WEBHOOK_ MAX_ WATCHERS postkeep_(gauge): the new-mail watchers running in this process,watchers 0withPOSTKEEP_;WEBHOOKS= false postkeep_(gauge), bydb_ connections state(idleorin_): this process’s open database connections.use
/healthz, /readyz and the scrapes themselves are not counted. No label
holds an address, a tenant, a principal, an account id, a token, or a
request’s path or query.
Rotating the master key
The sweep, and the re-wrap of data keys (step 3), run before a process serves
when previous keys are set, and, with or without them, shortly after every start
and then every hour. With more than one replica, a
replica that has not been rolled yet and runs this version writes no value
under the old master key: it encrypts a new value with its tenant’s data key.
What it can do is add a data key version: when it writes for a tenant whose
data key a new replica has made or wrapped again (that includes the first key
that a new replica’s sweep makes for a tenant that had none), it makes a new
one, wrapped under the old master key, and logs
no data key of this tenant can be unwrapped. The next pass of a new replica
wraps that version again, and the old replica adds another at its next write for
that tenant, so while it keeps writing a tenant gains at most one version for
each pass of a rolled replica, every hour on each; the rows are small, but
finish the roll within the hour. Remove the previous key only after every
replica has run a pass that moved and wrapped nothing (step 4). The re-wrap
follows the same rules as the sweep: a replica not rolled yet cannot unwrap a
data key that a new
replica has made or wrapped again, so a read of a value under that key can fail
on it until it is rolled; the user can connect again if a request hits it in the
meantime. A pending event that such a replica cannot open is held for an hour
(POSTKEEP_), with the events after it, and then skipped. The
account’s delivery position in the shared database then moves past it, so no
replica sends it: finish the roll within the hour, or stop the old ones first where
webhooks matter. Everything this version stores
(passwords, webhook secrets, filter patterns, events, provider tokens and
sign-ins in progress)
is encrypted with a data key that the master key wraps: the sweep leaves it
alone, and the re-wrap is what lets the previous key go for it. A value that an
earlier version stored directly under the master key is moved to the data key
of its tenant by the sweep, with previous keys or without: a start with them
moves it before serving, and any start moves it shortly after. An instance on
0.3.2 or earlier writes
values under the master key and cannot read a value once it is moved, so
replace such instances together (see
deployment).
- Generate a new key (
postkeep generate-key). - Set it as
POSTKEEP_and keep the old key inMASTER_ KEY POSTKEEP_(orPREVIOUS_ MASTER_ KEYS _FILE). Roll every replica onto that configuration and start each one again (changing a setting). Leave the old key in place. A new value is encrypted with its tenant’s data key, and a data key that a rolled replica makes is wrapped under the new master key. Replicas that are not rolled yet cannot unwrap a data key that a new replica has made or wrapped again, so expect reads to fail on them until the rollout finishes. On a database whose values are all still under the master key, such as one from 0.3.x, the reads that fail include every value the first rolled replica’s sweep moves, because the sweep makes the tenants’ first data keys. - At startup each replica decrypts stored secrets with the new key or,
failing that, a previous key, and moves each value that is still under the
master key to the data key of its tenant. The log line
moved stored secrets to data keysreportsconverted(values moved),already_(values already under a data key),v2 unreadable(values no key could read, and values still under the master key in a row without an account, which are left as they are) andlost_(values a writer changed meanwhile, which the next start looks at again). It then wraps each tenant’s data key again under the new key if a previous key wrapped it. The log lineraces re-wrapped data keysreports how many it wrapped again, and how many no configured key could unwrap, which are left as they are. A tenant’s data key is made when a password, a webhook secret, a filter pattern, an event, a provider token or a sign-in in progress is first stored for it, or the sweep first moves a value for it (sign-ins that no tenant started use thedefaulttenant’s), so on a database that earlier versions filled both re-wrap counts can be 0. - After every replica is running that configuration, wait an hour from the
start of the last one, or restart each one once more. A pass, or a start,
moves anything a replica on 0.3.2 or earlier wrote under the master key after
the previous sweep, and wraps again a data key version that a replica still
on the old master key added meanwhile. While previous keys are set, every
pass logs one line at
info,migrated stored values, with the counts of step 3 (unreadable_is the second line’skeys unreadable). Go on only when each replica that runs the job (an embedding’srunsmay leave it to some processes) has logged that line in that hour withconverted,lost_andraces rewrappedall 0. A replica that has logged no such line has shown nothing, so wait for it, also after a warning (could not move stored secrets to data keys,could not re-wrap data keys): it says that a pass failed, not what is left. - Only then remove the previous keys and start the server again. A value that no configured key can read is left alone. The account owner signs in again to replace a password. Webhook settings that cannot be read stay on the account page: it explains that the encryption key changed and asks for the URL and auth header again. Saving replaces the unreadable row, and rotating the signing secret asks for that re-entry instead of failing the page. A data key that no configured key can unwrap is counted as unreadable by every pass, so that count can stay above 0 for good; it does not hold up this step.
The sweep is idempotent and safe while serving, so a restart halfway
through simply continues. Do not drop POSTKEEP_ as soon
as every replica has started once: after that sweep, a replica that was still
on the old master key can have added a data key version wrapped under it, and
one on 0.3.2 or earlier can have written a value under it.
Who can connect
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
(anyone) | Comma-separated addresses allowed to use the server |
POSTKEEP_ is the main access control for a personal
server. Set it to your own address. It is checked case-insensitively:
- on the sign-in page, before anything is sent to the mail provider, so addresses outside the list never cause a login attempt;
- on every MCP request and every token refresh, so removing an address from the list cuts off its existing tokens at once;
- on the account page, before an IMAP watcher logs in, before a Graph subscription or a Gmail watch is created or renewed, before Graph or Gmail catch-up reads mail, and before a queued webhook event is sent, so removing an address stops its webhooks once the server runs with the new list (changing a setting), including events already waiting.
With Microsoft or Google sign-in the address is only known once the provider sends the user back, so the check runs then: a refused address gets no account, and postkeep revokes the grant it was just given (Google; Microsoft has no revocation endpoint for apps).
Leave it empty only for a server that is meant to be open to anyone.
Microsoft and Google sign-in
Step-by-step setup, including the provider consoles, publisher and app verification, and webhooks: Outlook, Gmail.
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
Application (client) ID of your Microsoft Entra app registration | |
POSTKEEP_ |
A client secret of that app registration | |
POSTKEEP_ |
OAuth client ID of your Google Cloud project (web application) | |
POSTKEEP_ |
Its client secret |
Each provider is optional. Its button appears on the sign-in pages only
when both its ID and its secret are set; setting just one of the pair is
a startup error. Register these redirect URIs with the provider, built
from POSTKEEP_:
- Microsoft:
{POSTKEEP_PUBLIC_ URL}/ oauth/ microsoft/ callback - Google:
{POSTKEEP_PUBLIC_ URL}/ oauth/ google/ callback
The server logs both at startup. Refresh tokens from the provider are stored encrypted under a data key that the master key wraps. If the provider rejects a refresh token (for example after a password change or a revoked consent), the account page asks the user to sign in again.
Gmail push
New-mail webhooks for Gmail accounts connected with Sign in with Google
need Google Cloud Pub/Sub: Gmail
publishes a notification to a topic in your Google Cloud project, and an
authenticated push subscription delivers it to POST / on your
server. Outlook accounts need nothing extra: Microsoft Graph calls
POST / directly.
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
Full topic name, projects/; enables Gmail push |
|
POSTKEEP_ |
Email of the service account the push subscription authenticates as (required with the topic) | |
POSTKEEP_ |
{POSTKEEP_ |
Audience set on the push subscription |
Gmail push also needs Google sign-in (POSTKEEP_ and
POSTKEEP_); a topic without it is a startup error.
postkeep accepts a push only with a Google-signed OIDC token whose
audience and service account match these settings, and renews each
account’s Gmail watch daily (a watch lapses after seven days).
Uploads
upload_ lets an agent attach a file
of up to 25 MiB that it sends with a command. Its bytes wait in an
S3-compatible bucket, sealed by postkeep; uploads are off until it is set.
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
The bucket’s https:// address, which turns uploads on; files go under uploads/ in it. For example https:// (Tigris), https:// (Cloudflare R2), https:// (AWS) |
|
POSTKEEP_ |
auto |
The region its requests are signed for: auto for Tigris and R2, the bucket’s region for AWS |
POSTKEEP_ |
The ID of an access key for that bucket | |
POSTKEEP_ |
Its secret |
The address, the key’s ID and its secret are set together or not at all,
else serve doesn’t start. The address must be https://, with no user,
password, query or fragment, and a path of letters, digits, -, ., _
and / only. All three are hidden from --help and never logged. A store
on plain HTTP needs TLS in front of it.
The bucket:
-
is postkeep’s own and private, with no versioning, snapshots or soft delete, so a deleted object is gone;
-
has one expiry rule on the whole bucket, making each object due for deletion a day after it was written, with any provider’s S3 API:
aws s3api put-bucket-lifecycle-configuration --endpoint-url <endpoint> --bucket <bucket> \ --lifecycle-configuration '{"Rules":[{"ID":"postkeep-uploads","Status":"Enabled","Filter":{},"Expiration":{"Days":1}}]}'or, on Tigris,
tigris buckets lifecycle create <;bucket> --expire-days 1 -
takes a key that can only read, write and delete objects in that bucket.
An upload stops working at once, when it is used or its hour ends. postkeep then clears its key and asks the bucket to remove its pieces, and retries outstanding removals in batches, at most 100 uploads and 2 minutes a cleanup; the expiry rule removes what they leave. Removal has no guaranteed deadline.
postkeep bounds what it reserves at once (per tenant 2 files arriving and 250 MiB kept, per server 8 and 1 GiB), not the bucket’s bill: the provider’s console shows its use. Unsetting the three settings turns uploads off; sends that name an upload then refuse it, and the expiry rule removes its pieces.
OAuth tokens and clients
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
3600 |
Access token lifetime (seconds) |
POSTKEEP_ |
2592000 |
Refresh token lifetime (seconds); each refresh issues a new one |
POSTKEEP_ |
10000 |
Maximum registered OAuth clients; registration answers 503 beyond it |
POSTKEEP_ |
20 |
Client registrations allowed per client IP in each window |
POSTKEEP_ |
3600 |
Length of that window (seconds) |
POSTKEEP_ |
86400 |
A client that never obtained a token is deleted this long after registering |
POSTKEEP_ |
2592000 |
A client without live grants is deleted this long after it last obtained a token |
Expired codes, tokens, pending sign-ins and abandoned client registrations are removed every 10 minutes.
Abuse limits
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
(peer address) | Header with the real client IP, set by your reverse proxy |
POSTKEEP_ |
120 |
Requests per minute per client IP on /register, /authorize, /token, /revoke, /account and /account/, /oauth/ and /oauth/, and /upload |
POSTKEEP_ |
60 |
Longest sign-in backoff for one address (seconds) |
POSTKEEP_ |
900 |
Longest sign-in backoff for one client IP (seconds) |
POSTKEEP_ does not cover /, /mcp, /healthz, /readyz,
/.well-known/, static assets, or the provider push endpoints
(/push/, /push/, /push/).
/healthz and /readyz are also outside the global concurrency cap, the
body limit and the request timeout.
Behind a reverse proxy, every request arrives from the proxy’s address, so
per-client limits would lump all users together. Set
POSTKEEP_ to the header your proxy sets:
| Proxy | Header |
|---|---|
| Fly.io | Fly-Client-IP |
| Cloudflare | CF-Connecting-IP |
| Caddy, nginx, Traefik, most load balancers | X-Forwarded-For (the last entry is used) |
Only set it when the proxy always overwrites or appends to that header; otherwise clients can forge their address. IPv6 clients are grouped by /64.
Sign-in backoff
Failed sign-ins slow down instead of locking anyone out. After five failures, each further failure doubles the wait before the next attempt, starting at one second:
- per client IP, up to 15 minutes, so someone guessing passwords is slowed down hard;
- per address, up to only one minute, so someone guessing at your address can make you wait at most a minute, from anywhere.
A successful sign-in clears the address’s backoff but not the IP’s, so signing in to one’s own account does not reset the backoff for guessing at others. The limits are kept in memory per process.
Request limits
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
1048576 |
Largest accepted request body, including any attachments (OAuth endpoints: 16 KiB) |
POSTKEEP_ |
120 |
Seconds a request may take, including reading its body, before 503 |
POSTKEEP_ |
256 |
Requests handled at once; more get 503 with Retry-After |
POSTKEEP_ |
4 |
MCP requests handled at once per account; more wait up to 10 s, then 503 |
POSTKEEP_ |
1024 |
Open HTTP connections; further connections are closed at once |
Request headers must arrive within 15 seconds of a connection becoming
active, which stops slow-header (“slowloris”) attacks. /healthz and
/readyz are exempt from the concurrency and timeout limits so a busy
server is not restarted by its health check or taken out of rotation by its
readiness check. Mail operations use POSTKEEP_ (30 seconds).
An IMAP search has a separate timeout for listing candidates and for each
batch it fetches. A search with header filters starts no more fetches after
one mail timeout, but a fetch already in progress can finish.
/upload keeps its own limits instead of the body limit and timeout: a file
of up to 25 MiB, 10 minutes in all and 30 seconds without a byte.
IMAP connection reuse
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
60 |
Seconds an idle IMAP session is kept for the next tool call of the same account; 0 turns reuse off |
Tool calls reuse an idle IMAP session of the same account instead of
connecting and logging in again. Sessions are keyed by account and by a
fingerprint of the stored credentials, so they are never shared between
accounts and a changed password never reuses an old session. A session goes
back to the pool only after a clean result, must answer NOOP before reuse,
and every operation selects its folder again. At most two idle sessions are
kept per account (256 in total); they are closed after the idle time and at
shutdown. Sending mail always uses a fresh SMTP connection.
New-mail webhooks
| Variable | Default | Purpose |
|---|---|---|
POSTKEEP_ |
true |
Offer opt-in new-mail webhooks on the account page; false hides them and starts no watchers |
POSTKEEP_ |
100 |
Accounts watched at once. An IMAP webhook keeps one IMAP connection open; Outlook, and Gmail with Sign in with Google, do not. A paused webhook still uses a slot: IMAP keeps that connection, and Gmail and Graph keep renewing their watches. Turning the webhook off frees the slot. |
POSTKEEP_ |
3600 |
Seconds between delivery attempts while a webhook is paused after repeated failures, and the longest wait before it is paused. From 1 to 86400. |
POSTKEEP_ |
604800 |
Seconds events are kept when the account has no override (7 days). The cap counts delivered and undelivered events. From 3600 to 31622400, and at most POSTKEEP_. |
POSTKEEP_ |
1000 |
Events kept per account, delivered or not, when the account has no override. From 1 to 100000, and at most POSTKEEP_. |
POSTKEEP_ |
2592000 |
Longest retention an account may set (30 days). From 3600 to 31622400. |
POSTKEEP_ |
10000 |
Most events one account may keep. From 1 to 100000. An event is about 1 KB of encrypted JSON, so 10000 events is about 10 MB per account, and 100 accounts at that ceiling is about 1 GB. The event cap is the disk bound: a busy inbox reaches it before the retention clock does. |
POSTKEEP_ |
3600 |
Seconds an event that this server cannot open is held, with the events after it, before it is skipped with a warning, counted from when the event was stored. A replica that has not been rolled onto the keys that wrote it cannot open it; holding writes nothing, so a replica that can open it is not held up. From 0 to 31622400; 0 skips at once. An event in a newer format than this version reads is held until a version that reads it sends it or the outbox removes it. |
POSTKEEP_ |
1000 |
How many of a mailbox’s filter rules count, oldest first; newer ones judge nothing and none can be added past it. From 0 to 2000; a higher value stops the server at start. An embedding’s usage hook replaces it per mailbox. Not used while POSTKEEP_. |
Users turn webhooks on for their own account at /account. A watcher per
enabled webhook waits for new Inbox mail: IMAP IDLE (renewed every 25
minutes, or a poll every minute if the server has no IDLE), a Graph
subscription, or a Gmail watch. A paused webhook stays enabled, so it
still uses one slot: IMAP keeps its connection, and Gmail (users.)
and Graph (the subscription) keep renewing on their usual schedule. A
pause does not add provider calls. Turning the webhook off stops that
watcher, frees the slot, and stops the provider watch (Gmail users.,
Graph subscription delete). It waits 3 seconds
to batch a burst. A large backlog can be several events. Watchers need a
process that keeps running: on platforms that stop idle instances, events
are only sent while an instance is up (see
deployment). The payload, signature and
retry rules are in webhooks.
Mail providers
Users sign in with an app password at one of the providers this server offers.
The sign-in page shows a provider picker when more than one is offered, with
the default provider picked. An address at a provider’s own domain
(@icloud., @fastmail., @yahoo., …) always uses that provider:
the picker switches to it as the address is typed, and the server uses it even
when the picker names another one. For any other domain, the provider picked
is used.
| Variable | Default | Meaning |
|---|---|---|
POSTKEEP_ |
icloud,fastmail,yahoo,gmail (none when POSTKEEP_ is set) |
Comma-separated presets to offer: icloud, fastmail, yahoo, gmail |
POSTKEEP_ |
(unset) | IMAP host of a custom mail server, offered instead of the presets unless POSTKEEP_ lists them |
POSTKEEP_ |
Custom mail server |
Name of the custom server on the sign-in page |
POSTKEEP_ |
993 |
IMAP port of the custom server |
POSTKEEP_ |
tls |
tls or plaintext (local test servers only) |
POSTKEEP_ |
the IMAP host | SMTP host of the custom server |
POSTKEEP_ |
587 |
SMTP port of the custom server |
POSTKEEP_ |
starttls |
tls, starttls or plaintext (local test servers only) |
POSTKEEP_ |
30 |
Mail timeout in seconds; IMAP searches use separate timeouts for the initial listing and each fetch batch |
| Preset | IMAP | SMTP | App passwords |
|---|---|---|---|
icloud |
imap. (TLS) |
smtp. (STARTTLS) |
Apple |
fastmail |
imap. (TLS) |
smtp. (TLS) |
Fastmail |
yahoo |
imap. (TLS) |
smtp. (TLS) |
Yahoo |
gmail |
imap. (TLS) |
smtp. (TLS) |
Users can’t type in a server address: only the operator can add a custom server, so the sign-in form can’t be used to make this server connect to arbitrary hosts.
Each account records the provider it signed in with. Accounts created by
versions before 0.2 recorded none; at startup they are assigned the default
provider (the custom server if POSTKEEP_ is set, otherwise iCloud
Mail, otherwise the first provider offered). The first two are the
servers those accounts already used. Removing a provider from
POSTKEEP_ stops its accounts from working until it is offered
again; their data is kept.
A version from before the Gmail preset does not know gmail: it reports a
Gmail account’s provider as not offered, and it refuses to start when
POSTKEEP_ names it. In a rolling upgrade, add gmail to a list
you set yourself only once every replica runs the new version.
Upgrading from 0.1 with the default settings changes nothing for existing
iCloud accounts. To keep offering only iCloud Mail, set
POSTKEEP_. Before 0.2, setting POSTKEEP_
replaced iCloud; it still does unless POSTKEEP_ is also set.
The tests use it to point the server at GreenMail.