Summary

  • RFC 3028 turned server-side mail filtering into a deliberately powerless language — Sieve — and made implicit keep the safety net whenever a script selected no delivery-affecting action.
  • keep, fileinto, redirect, discard and rejection described dispositions at the interpreter's edge; storage, onward acceptance, refusal and final observation stayed with the running mail system.

Somewhere on a mail server in January 2001, a filter script runs to the end and picks nothing. No folder. No forward. No bounce. In a careless design, that silence is exactly where your mail dies — quietly, with nobody to blame and nothing to point at. RFC 3028 decided silence should mean keep it. In that one small default, the Sieve filtering language drew the line the Internet has been redrawing ever since: the difference between deciding something and doing it.

The problem it solved was awkward and very real. Users wanted mail sorted, forwarded or rejected before they ever opened a mailbox. Operators were not about to hand every user a general-purpose program on the delivery server. A language expressive enough to run arbitrary code would have turned a convenience feature into a security boundary nobody could contain.

RFC 3028, written by Tim Showalter at the University of Michigan, answered by removing power. Sieve had no loops, no functions, no variables and no route to an external shell. Tests examined message facts without side effects. Control commands chose which blocks ran. Action commands requested what should happen to the message. That was not syntactic housekeeping. It separated observation from mutation, and kept the mutation vocabulary small enough for a tired administrator to reason about at three in the morning.

The most revealing part of the design is what happens when no action runs at all.

Implicit keep: the empty branch gets a job

Filtering rules miss cases. A sender changes an address, a mailing list rewrites a header, or a condition is simply written wrong. In a destructive system, falling through every branch would quietly shred mail by accident. RFC 3028 therefore defined an implicit keep: unless some action cancelled it, the system performed the same default disposition it would have used with no filter at all — generally filing the message in the user's main mailbox.

Implicit keep was not a second copy appended to every result. keep, fileinto, redirect and discard cancelled it. The interpreter was evaluating an action set, not running an unconditional safety copy after each branch. Some later extensions could produce side effects without cancelling the default, but they had to say so out loud. The question "does this action cancel implicit keep?" became part of the action's contract — a clause in the paperwork, not a footnote.

That contract explains a rule that looks strange until you read it twice. discard did not destroy the other actions. It silently cancelled implicit keep. A script that performed fileinto and then discard still filed the copy; the discard merely prevented a further default one. The verb sounded absolute. Its defined effect was relational: remove the fallback, leave the compatible actions standing. discard is not an executioner. It is a man quietly taking away the spare key.

Five verbs, five dependencies

The language used concrete verbs, and every one of them leaned on machinery outside the script.

keep requested the implementation's ordinary default disposition. It spared the author from knowing whether the main mailbox was called INBOX, backed by a file, or served from another store entirely. That abstraction was useful precisely because the command did not describe the storage mechanism. A successful branch selection proved nothing about disk space, permissions or whether the commit ever landed.

fileinto named a folder. RFC 3028 recommended support while conceding that some environments could not provide it. A folder string was an instruction to a delivery agent, not a certificate that the folder existed or that a write became durable.

redirect was more revealing still. It rewrote the envelope recipient and sent the message outward in the style of an MTA forward. The local interpreter could choose that path and attempt it. A remote server still controlled acceptance, and whatever "delivered" meant on the far side was somebody else's definition. Loop detection was an implementation duty too. The word redirect opened another delivery episode; it did not close one.

discard deliberately produced no failure notice. The silence removed a class of feedback and, with it, a sender-visible receipt. Evidence of the script's decision had to come from the executing system's records — if the operator kept any. No bounce is not proof of storage, of forwarding, or even of a particular filtering reason. It is proof of nothing at all.

When verbs collide: governance for side effects

Once several actions could apply to one message, their combinations mattered more than their names. RFC 3028 required extensions to define how they interacted with the base actions. Sites could cap how many actions ran and which combinations were permitted. Implementations were expected to avoid duplicate delivery to the same mailbox even when a script asked twice.

These rules governed amplification and contradiction. A user who could redirect repeatedly might build a mailbomb. A script that both delivered and rejected could tell the sender the message failed while quietly keeping a copy. A system treating every action as independent would produce outcomes no rule author ever intended.

Later standards sharpened the point. RFC 5228 replaced RFC 3028 but preserved implicit keep and the base disposition model, clarifying error handling and extension interaction. RFC 9122 eventually produced an IANA Sieve Actions registry whose columns include action interactions and whether an action cancels implicit keep. The registry turned an architectural question into explicit metadata — a catalogue of contracts that still says nothing about whether any particular action succeeded.

Rejection and the bill for backscatter

The original reject extension showed what happens when the boundary is drawn in the wrong part of the delivery sequence. RFC 3028's reject discarded the message and sent a Message Disposition Notification to the envelope sender — sometimes long after the receiving system had already accepted it. When spam forged the sender, the notification landed on an innocent third party. The industry gave the resulting mess a name: backscatter.

RFC 5429 revised the model. Its ereject action preferred refusing delivery during SMTP or LMTP where possible, rather than accepting first and apologising later. It also clarified that rejection cancelled implicit keep, forbade multiple rejections and discouraged pairing rejection with actions that delivered mail. That was not cosmetic tidiness. A sender should not be told a message was rejected by a system that also stored or forwarded it.

Three records, not one

This history hides three different facts behind a single status word. The script may select rejection. The executing component may be able to refuse at the protocol boundary, or may need some other mechanism. The sender may observe a protocol response, a later report, or nothing whatsoever. "Rejected" without the layer and the evidence is an incomplete sentence.

ManageSieve later standardised a separate administrative surface for uploading, checking and activating scripts, and that separation matters here. A script can be valid and active without ever having evaluated a particular message. An evaluation can select an action without that action reaching its intended endpoint. Administration, decision and outcome are three records, not one.

Sources

Lu Heng did not author or endorse RFC 3028, RFC 5228 or RFC 5429. His essays are used here as disclosed analytical lenses.