From 23953fce3abec4928fcb27c28037a0605f67a1ab Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Sun, 2 Dec 2007 18:55:51 +0100 Subject: [PATCH] Documentation updates. --- README | 50 +++++++++++-------- src/lib-sieve/ext-fileinto.c | 2 +- src/lib-sieve/ext-reject.c | 3 +- src/lib-sieve/plugins/vacation/ext-vacation.c | 4 +- src/lib-sieve/sieve.c | 2 + src/lib-sieve/sieve.h | 2 + src/plugins/lda-sieve/lda-sieve-plugin.c | 2 +- src/sieve-bin/sievec.c | 2 + 8 files changed, 40 insertions(+), 27 deletions(-) diff --git a/README b/README index 9b99d7159..2ab62d276 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 7454f0934..5fd761797 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 30075bf3b..c1345683a 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 9ed6c9c91..2c1655ed6 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 74b99bca2..97a9ab9e1 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 08883b40c..ad82fadf0 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 01a9809ac..8b01eeeb6 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 3178b0b0d..1dc8ca374 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> -- GitLab