Files
inbuxa-server/vendor/sieve-rs/VENDORED.md
jcoffey-dev bac77cf1c7
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 8m27s
Sieve: accept the pre-rename vnd.stalwart.* extension names
A script written for upstream that requires vnd.stalwart.expressions or
vnd.stalwart.while keeps running after a move to INBUXA, since scripts are
stored compiled. But it can't be saved again once edited: the old name
parses as an unknown extension, and let or eval then fails with
"Undeclared capability 'vnd.inbuxa.expressions'". Both spellings now
parse to the same capability. Only the INBUXA names are advertised.
2026-10-26 23:08:53 -07:00

1.9 KiB

sieve-rs, vendored

The published sieve-rs 0.7.3, taken from crates.io under AGPL-3.0-only, with the upstream project's name taken out of the identifiers it spells into the Sieve language (docs/spec/SPEC.md §2.4). The root Cargo.toml patches it in with [patch.crates-io].

Changes

Every changed file carries the AGPL 5(a) notice in its header.

  • src/compiler/grammar/mod.rs: the extensions scripts require and ManageSieve advertises are vnd.inbuxa.while and vnd.inbuxa.expressions. The pre-rename vnd.stalwart.* spellings are still accepted, never advertised, so a script written for upstream compiles when it's edited. Without them, the name is treated as an unknown extension and let or eval fails with "Undeclared capability". The legacy_extension_names tests cover both.
  • src/runtime/mod.rs: the default environment "name" is inbuxa Sieve (the server sets its own name on both of its runtimes anyway), and the test-only capability is vnd.inbuxa.testsuite.
  • src/lib.rs: the test-suite environment variables are vnd.inbuxa.*.
  • Cargo.toml: the example target is dropped, with the top-level examples/ and tests/, which the server never builds. (src/ keeps its own tests modules: the crate declares them.)

Updating

When the server's Cargo.lock moves sieve-rs to a new version, Cargo stops using this copy and only warns that the patch went unused. The unit test sieve_extensions_carry_the_fork_name in crates/common fails when that happens. Re-vendor the new version from ~/.cargo/registry/src/*/sieve-rs-*, dropping the top-level tests/ and examples/ (only those: rsync --exclude /tests --exclude /examples), Cargo.lock and Cargo.toml.orig, repeat the changes above, and update the version here and in the root Cargo.toml comment. tools/fork/name-check.py covers vendor/ too, so a rename missed in a new version fails CI.