62. pepsi-stage-quarantine

Hold a message until an operator releases or deletes it.

62.1. Role

pepsi-stage-quarantine is where quarantined mail waits. A milter’s quarantine request (pepsi-stage-milter’s QUARANTINE_STAGE, or a pre-queue milter at pepsi-ingress), pepsi-stage-decrypt’s QUARANTINE_STAGE or any other route can send a message there. The stage holds it until an operator acts with pepsi-queue quarantine, and it sends no notice of its own. Keeping the quarantine a stage means that a site can put a different handler in its place. Reference: pepsi-stage-quarantine(1).

62.2. Features

  • Held without a timer: on arrival the stage records state.quarantine.since and leaves the row paused with no timeout, so pepsi-dispatch never wakes it on its own.

  • Released by an operator: pepsi-queue quarantine release TOKEN hands the row back to the stage, which records released_at and sends the message on to RELEASE_STAGE. pepsi-queue quarantine delete TOKEN removes it (recorded in the opt-in mail log). The payment webhook (POST /resume of pepsi-httpd) leaves a held message alone.

  • An optional end: with MAX_HOLD (for example 14 days) the hold ends on its own; the message then goes to EXPIRE_STAGE, marked like an expired quarantine of pepsi-queue gc (failure_class = quarantine-expired, the header block only in a DSN), or it is deleted. Without MAX_HOLD, pepsi-queue gc bounces a message that is still held [pepsi-queue] QUARANTINE_MAX_AGE_DAYS (14) days after its arrival, as at every quarantine stage, because held mail is plaintext at rest.

  • No oracle at the end: a member’s copy of a list post, and a message whose content came from a ciphertext without integrity protection, are deleted at expiry rather than routed (Bounces and replies to encrypted mail).

  • Held again after a release: a message that comes back to a quarantine stage after an earlier release starts a new hold.

  • Not left to correspondents: the options are read from the base configuration, never from per-address settings.

62.3. Configuration

[stage-<name>]: PROGRAM = pepsi-stage-quarantine, RELEASE_STAGE (default NEXT_STAGE; one of the two is required), MAX_HOLD (a span; a day counts as 24 hours) and EXPIRE_STAGE (needs MAX_HOLD). A message that ingress quarantined has skipped every stage before this one, so for that use RELEASE_STAGE is normally init. pepsi-setup validate and the worker’s start-up check refuse a target that does not exist or that is the stage itself.

62.4. State

  • Inputs: state.quarantine.reason and by, written by whoever sent the message here.

  • Outputs: state.quarantine: since, until (with MAX_HOLD), released_at or expired (pepsi.state(7)).

62.5. See also

pepsi-queue, pepsi-stage-milter, Operating Pepsi, pepsi-stage-quarantine(1).