check-sieve(1)
π check-sieve(1) β General Commands Manual, but make it group chat π
okay so bestie, this is the manual for check-sieve: the syntax checker for mail sieves. it lives in the General Commands Manual, it has a whole lot of RFC energy, and we're gonna get into all of it. no cap. π«Ά
πΈ NAME πΈ
check-sieve β syntax checker for mail sieves. periodt. π
β¨ SYNOPSIS β¨
here's the shape of it, bestie:
check-sieve [options] file [ file ... ]
check-sieve --help
check-sieve --version
π¦ DESCRIPTION π¦
okay so check-sieve is a simple syntax checker for server-side mail sieves. it supports many mail-sieve RFCs, and the details are literally below. iykyk. π
π OPTIONS π
-h,--helpβ show the program help.--max-list-length Nβ check the length of string lists, and flag any that are longer than the specified length.--server <host>:<port>β connect to the specified server, and only enable advertised capabilities.--trace-parserβ trace the operation of the parser.--trace-scannerβ trace the operation of the scanner.--trace-treeβ trace the abstract-syntax-tree.--simulate <email-file>β simulate sieve processing against an email file (.emlformat). see SIMULATION below.--test-dir <dir>β run simulation for every.emlfile in dir and diff each result against a matching.outfile. see SIMULATION below.--rebase <dir>β regenerate the.outfiles in dir from current simulation output. see SIMULATION below.--versionβ print out version information.
π§ͺ SIMULATION π§ͺ
check-sieve can simulate how a sieve script sorts mail, making it straightforward to verify script behavior without deploying to a mail server. so you can test the vibe before it hits prod. π
π Single-message simulation π
--simulate <email-file>β validates the sieve script and then evaluates it against the given.emlfile. each test that matches is printed asMATCH: <test>and each executed action asACTION: <action>. if no delivery action is taken,keep (implicit)is added automatically per RFC 5228 Β§4.2.
NOTE: Many RFC extensions are still in progress. Filing an issue for unsupported extensions will help prioritize what to work on next. π«Ά
π§Ί Batch testing with a test directory π§Ί
A test directory contains .eml files and, optionally, .out files that record expected simulation output. the .out file for a given email is named after the email's stem (e.g. msg.eml β msg.out).
--test-dir <dir>β runs simulation against every.emlfile in dir. for each email that has a matching.outfile, the actual output (with the environment-specific first line stripped) is diffed against it. if all comparisons pass the program exits0with no output. if any differ, each diff is printed followed by a summary onstderrand the program exits1. emails without a.outfile are simulated but not compared.--rebase <dir>β regenerates the.outfile for every.emlfile in dir, creating or overwriting as needed. run this after making intentional changes to a sieve script or the simulator to update the expected output before re-running--test-dir.
π BUGS π
for information on existing issues, and to file a bug report check the following URL: https://github.com/dburkart/check-sieve/issues
π AUTHORS π
- Dana Burkart
- Stuart Montgomery
π SUPPORTED RFCs π
the full list of supported RFCs is:
- Sieve: An Email Filtering Language (
RFC 5228) - Variables Extension (
RFC 5229) - Date and Index Extensions (
RFC 5260) - Vacation Extension (
RFC 5230) - Vacation "Seconds" Parameter (
RFC 6131) - Include Extension (
RFC 6609) - Copying Without Side Effects (
RFC 3894) - Reject and Extended Reject Extensions (
RFC 5429) - Body Extension (
RFC 5173) - Relational Extension (
RFC 5231) - MIME Part Tests, Iteration, Extraction, Replacement, and Enclosure (
RFC 5703) - Imap4flags Extension (
RFC 5232) - Editheader Extension (
RFC 5293) - Regex Extension (DRAFT)
- Spamtest and Virustest Extensions (
RFC 5235) - Extensions for Notifications (
RFC 5435) - Subaddress Extension (
RFC 5233) - Ihave Extension (
RFC 5463) - Environment Extension (
RFC 5183) - Sieve Notification Mechanism: mailto (
RFC 5436) - Internet Message Access Protocol (IMAP) Events (
RFC 6785) - Converting Messages before Delivery (
RFC 6558) - Detecting Duplicate Deliveries (
RFC 7352) - Externally Stored Lists (
RFC 6134) - Delivering to Special-Use Mailboxes (
RFC 8579) - File Carbon Copy (FCC) (
RFC 8580) - Delivery by MAILBOXID (
RFC 9042) - Delivery Status Notifications and Deliver-By Extensions (
RFC 6009) - Extension for Processing Calendar Attachments (
RFC 9671) - Proton Expiration Extension (vendor-specific)
- Proton Eval Extension (vendor-specific)
- Dovecot Invoking External Programs (vendor-specific)
mwah π β this page is from version 1.0.1, dated 10 Apr 2026, and it's the check-sieve(1) page. byeee bestie π«Ά
π¦ where this page comes from
- arch rolling: check-sieve 1.0.1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms