.. This file is part of PEPSI. Copyright (C) 2026 GNUnet e.V. PEPSI is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. ====================== pepsi-stage-quarantine ====================== *Hold a message until an operator releases or deletes it.* Role ==== ``pepsi-stage-quarantine`` is where quarantined mail waits. A milter's quarantine request (:doc:`pepsi-stage-milter`'s ``QUARANTINE_STAGE``, or a pre-queue milter at :doc:`pepsi-ingress`), :doc:`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: :manpage:`pepsi-stage-quarantine(1)`. Features ======== * **Held without a timer:** on arrival the stage records ``state.quarantine.since`` and leaves the row ``paused`` with no ``timeout``, so :doc:`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 :doc:`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 (:ref:`sec-encrypted-bounces`). * **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. Configuration ============= ``[stage-]``: ``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. 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`` (:manpage:`pepsi.state(7)`). See also ======== :doc:`pepsi-queue`, :doc:`pepsi-stage-milter`, :doc:`../operations`, :manpage:`pepsi-stage-quarantine(1)`.