This project aims to make checking mail Sieve syntax easy and painless. Because breaking your sieve in production sucks.
Particular attention is paid to the quality of errors generated. For example:
Errors found in "testsieve":
Incorrect syntax for command "convert".
On line 2:
convert image image ["pix-x=320","pix-y=240"];
^^^^^^^
Usage: convert <quoted-from-media-type: string>
<quoted-to-media-type: string>
<transcoding-params: string-list>
For a web-based demonstration of check-sieve which is entirely browser-based, visit https://checksieve.com.
Usage: check-sieve [options] file1 [file2 ...]
Options:
-h, --help Show this message
--max-list-length N Flag lists over a certain length (default: none)
--server <host>:<port> Only allow capabilities advertised by the specified
server.
--trace-parser Trace the operation of the parser
--trace-scanner Trace the operation of the scanner
--trace-tree Trace the abstract-syntax-tree
--version Print out version information
[!NOTE] If you find any discrepancies with these RFCs, have a request for an RFC not included, or have test-cases that should work but don't, please file an issue.
check-sieve
minimally depends on having a modern C++ compiler and the
Make build automation software.
On BSD-like systems such as FreeBSD, the gmake
tool is required.
Building check-sieve
only depends on those aforementioned tools. Developing
check-sieve
requires addition dependencies:
Additionally, Emscripten is required to generate the Check Sieve JavaScript library.
```bash # Synchronize mirrors sudo apt-get update # Core development dependencies sudo apt-get install make gcc g++ bison flex python3 libpython3-dev # JavaScript dependencies sudo apt-get install emscripten ```
```bash # Synchronize mirrors, and # Core development dependencies sudo pacman -Syu make gcc bison flex python # JavaScript dependencies sudo pacman -Sy emscripten ```
At the moment, there are four targets for this project:
check-sieve
-- This is a command-line program you can use to verify sieves.libchecksieve.a
-- A statically linked library for embedding in other programs (like check-sieve
).checksieve.so
-- This is a python extension created for use by the unit tests in the test directorywasm
-- 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.
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.
Installation of the latest edge snap from snapcraft can be done with the following command:
snap install --edge check-sieve