Skip to content

dburkart/check-sieve

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
gen
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Status

check-sieve

This project aims to make checking mail sieve syntax easy and painless. Because breaking your sieve in production sucks.

For a web-based demonstration of check-sieve which is entirely browser-based, visit https://checksieve.com.

Build Dependencies

check-sieve minimally depends on having a modern C++ compiler. On BSD-like systems such as FreeBSD, you'll also need gmake installed.

Development Dependencies

The following dependencies are required in order to develop check-sieve:

  • bison >= v3.0.4
  • flex >= v2.5.35
  • Python >= 3.7
  • Python development headers (for testing)

Additionally, if you want to generate a javascript library, you'll need emscripten installed.

Compiling

At the moment, there are four targets for this project:

  1. check-sieve -- This is a command-line program you can use to verify sieves.
  2. libchecksieve.a -- A statically linked library for embedding in other programs (like check-sieve).
  3. checksieve.so -- This is a python extension created for use by the unit tests in the test directory
  4. wasm -- This builds a webassembly javascript library using emscripten.

To build check-sieve simply run make. This will also build the static library. Running make test will compile checksieve.so and run the python tests in the tests directory. Finally, running make all will run all of the other targets.

Installing

To install to /usr/local/, simply run the following:

make install

To install to a custom location, build and install with INSTALL_PREFIX set in your environment to the desired location.

Packages

Supported RFCs

Currently, the supported RFCs are:

  • Sieve: An Email Filtering Language (RFC 5228)
  • Variables Extension (RFC 5229)
  • Date and Index Extensions (RFC 5260)
  • Vacation Extension (RFC 5230)
  • 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 (6558)

If you find any discrepancies with these RFCs, or have reduced test-cases that should work but don't, please file an issue. If there's an RFC that isn't supported that you want, file an issue!