diff --git a/README b/README index 9b99d71591652424592bd46a68bcbbec66dac660..2ab62d276c739ac44116467c267e1890e0461587 100644 --- a/README +++ b/README @@ -15,15 +15,28 @@ sievec <sieve-file> Compiles the script and produces various dumps of intermittent compilation results. This already works pretty good for all supported features. -sieve-test <sieve-file> [ <mailfile> / - ] +sieve-test [-r <recipient address>][-s <envelope sender>] + [-m <mailbox>][-d <dump filename>] <scriptfile> <mailfile> -Reads mail message from the specified mailfile (- = stdin) and executes the +Reads mail message from the specified mailfile and executes the specified sieve script to produce a verdict. This prints an execution dump with the instructions encountered during execution and finally it prints a list of -actions that would have been performed on this message. +actions that would have been performed on this message. + +Options: + -r envelope recipient address + -s envelope sender + -m the mailbox where the keep action should store + -d causes a dump of the generated code to be written to the specified + file. Using - as filename causes the dump to be written to stdout Various example scripts are bundled in the directory 'sieve'. +Authors +------- + +Refer to AUTHORS file. + Features -------- @@ -41,11 +54,10 @@ What works: and address-part modifiers already work. * Interpreter runs and dumps core commands and tests. Comparators, match-types and address-part modifiers have the desired effect. Most test commands work as - specified. + specified (see list below). * The interpreter produces a result containing a set of actions to execute. - Duplicate actions can now be avoided and conflicts can be detected. The redirect, - keep, discard and fileinto commands now produce effective actions. Other action - commands are still pretty much dummies. + Duplicate actions can now be avoided and conflicts can be detected. +* Execution is now also supported for all core commands. Base tests and their implementation status: false, true: trivial, full @@ -67,7 +79,7 @@ Extensions and their implementation status: Base specification (RFC3028): fileinto: full - reject: validation, generation and interpretation; no execution + reject: full envelope: full encoded-character: planned (draft-ietf-sieve-3028bis) @@ -76,7 +88,8 @@ Extensions and their implementation status: comparator-i;ascii-numeric: full relational: full regex: full, but suboptimal - vacation: validation, generation and interpretation; no execution + vacation: almost complete; no support for required References header + and :addresses and :mime are currently ignored. imapflags: flag management works, but flags are not stored copy: full include: planned (* first leave out variables support) @@ -117,30 +130,25 @@ INTERPRETER: sieve-interpreter.c TODO ---- -* Produce a fully working interpreter that actually executes actions, currently - tests are evaluated, but actions just print their occurence. +* Further implement error handling and limit the maximum number of errors. +* Produce a substitute sieve plugin for deliver (currently a stub and not + part of the make process) * Verify outgoing mail addresses -* Extract code dump functionality from interpreter and start sieve-code-dump.c * Resolve code duplication introduced for handling address-parts and match-types in different command implementations. +* Resolve code duplication amongst comparator, address-part and match-type + support as much as possible. +* Allow the currently in-memory byte-code to be stored as a script binary * Make this implementation conform section 2.7.2 of RFC3028 (Comparisons Across Character Sets). * Implement a faster substring search algorithm to make sopport for the body extension a less bad idea. -* Further implement error handling and limit the maximum number of errors. -* Resolve code duplication amongst comparator, address-part and match-type - support as much as possible. -* Use dovecot streams for code dump (debugging), currently the code is riddled - with printf()s. * Give the binary format some more thought, it is currently quite rough and to the point. -* Produce a substitute sieve plugin for deliver (currently a stub and not - part of the make process) * Full standards compliance review for the engine and all fully implemented sieve extensions. * Full security review. Enforce limits on number of created objects, script size, - etc... + execution time, etc... * Automate script tests; i.e. build a test suite. * Use mmap for the binary script representation. -* Allow the currently in-memory byte-code to be stored as a script binary diff --git a/src/lib-sieve/ext-fileinto.c b/src/lib-sieve/ext-fileinto.c index 7454f093471aa9bd13b8283cc1b7ef459b13006b..5fd76179782c46c4c22bc37371287593bbdef5c0 100644 --- a/src/lib-sieve/ext-fileinto.c +++ b/src/lib-sieve/ext-fileinto.c @@ -3,7 +3,7 @@ * * Authors: Stephan Bosch * Specification: RFC3028 - * Implementation: no action effect + * Implementation: full * Status: experimental, largely untested * */ diff --git a/src/lib-sieve/ext-reject.c b/src/lib-sieve/ext-reject.c index 30075bf3bcfd09f4bbd4be5174f8dd5b96e91a17..c1345683ac904aebe9c0c1ae8a2e763b298d7720 100644 --- a/src/lib-sieve/ext-reject.c +++ b/src/lib-sieve/ext-reject.c @@ -3,8 +3,7 @@ * * Authors: Stephan Bosch * Specification: RFC3028, draft-ietf-sieve-refuse-reject-04 - * Implementation: validation, generation and interpretation, no actual - * execution. + * Implementation: full * Status: experimental, largely untested * */ diff --git a/src/lib-sieve/plugins/vacation/ext-vacation.c b/src/lib-sieve/plugins/vacation/ext-vacation.c index 9ed6c9c911fff34f6d1352458ac2639301abab55..2c1655ed66ec7e3b806e50138773bf48e6073e7d 100644 --- a/src/lib-sieve/plugins/vacation/ext-vacation.c +++ b/src/lib-sieve/plugins/vacation/ext-vacation.c @@ -3,8 +3,8 @@ * * Authors: Stephan Bosch * Specification: draft-ietf-sieve-vacation-07 - * Implementation: validation, generation and interpretation, no actual - * execution. + * Implementation: almost complete, the required sopport for Refences header + * is missing and :addresses and :mime are ignored. * Status: experimental, largely untested * */ diff --git a/src/lib-sieve/sieve.c b/src/lib-sieve/sieve.c index 74b99bca25a04a5581064f5d201766002d9ca9a8..97a9ab9e1564ef9fba0ef221d9c3a586c72edcf9 100644 --- a/src/lib-sieve/sieve.c +++ b/src/lib-sieve/sieve.c @@ -1,3 +1,5 @@ +/* Copyright (c) 2002-2007 Dovecot authors, see the included COPYING file */ + #include "lib.h" #include "str.h" #include "istream.h" diff --git a/src/lib-sieve/sieve.h b/src/lib-sieve/sieve.h index 08883b40c92d2156f66cd1a4f4c1694bdea5d047..ad82fadf0bfe9e93efd5514b64bbc69771abbac0 100644 --- a/src/lib-sieve/sieve.h +++ b/src/lib-sieve/sieve.h @@ -1,3 +1,5 @@ +/* Copyright (c) 2002-2007 Dovecot authors, see the included COPYING file */ + #ifndef __SIEVE_H #define __SIEVE_H diff --git a/src/plugins/lda-sieve/lda-sieve-plugin.c b/src/plugins/lda-sieve/lda-sieve-plugin.c index 01a9809ac93aa88892c6e138317ba78caad2099f..8b01eeeb69ae7d55fcead5049b91c427b9ec5731 100644 --- a/src/plugins/lda-sieve/lda-sieve-plugin.c +++ b/src/plugins/lda-sieve/lda-sieve-plugin.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 Timo Sirainen */ +/* Copyright (c) 2002-2007 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "home-expand.h" diff --git a/src/sieve-bin/sievec.c b/src/sieve-bin/sievec.c index 3178b0b0d7348275f75bffdc6b7127dad890b20b..1dc8ca374c0bd6227f96b41fa7ed328f117d69f1 100644 --- a/src/sieve-bin/sievec.c +++ b/src/sieve-bin/sievec.c @@ -1,3 +1,5 @@ +/* Copyright (c) 2002-2007 Dovecot authors, see the included COPYING file */ + #include <stdio.h> #include <sys/types.h> #include <sys/stat.h>