diff --git a/INSTALL b/INSTALL index ec6f2dd57ff6db47731001584fee31fdc76b3047..caebf2a456f585fe1db9038e26f8d3a9c4e572a1 100644 --- a/INSTALL +++ b/INSTALL @@ -4,12 +4,25 @@ Compiling First of all you'll need to have pre-built Dovecot 1.2 sources available. It's also not a good idea to build the plugin against self-compiled Dovecot sources, but then actually use a prebuilt binary package of Dovecot. That might work if -the Dovecot versions are the same, but it's not guaranteed. +the Dovecot versions are the same, but it's not guaranteed. You can also use +installed Dovecot headers to compile this package, but then command line tools +like sievec and sieved will not be compiled. This is also true for the test +suite. + +This package is compiled and configured as follows: ./configure --with-dovecot=../dovecot-1.2 make sudo make install +The --with-dovecot parameter points to your Dovecot sources or, in case you are +compiling against the headers, to the directory where the dovecot-config file is +installed. + +If you downloaded this package through Mercurial, you need to execute +./autogen.sh first to build the automake/autoconf structure. This requires +autotools and libtool to be installed. + Configuring ----------- @@ -18,3 +31,15 @@ however, and not 'cmusieve'. For a detailed description on installing the cmusieve plugin for deliver refer to the dovecot wiki: http://wiki.dovecot.org/LDA/Sieve + +Test Suite +---------- + +This package includes a test suite to verify the basic processing of the Sieve +interpreter on your particular platform. Note that the test suite is not +available when this package is compiled against the Dovecot headers. The test +suite executes a list of test cases and halts when one of them fails. If it +executes all test cases successfully, the test suite finishes. You can execute +the test suite using `make test`. + + diff --git a/NEWS b/NEWS index 213abad0f175964c35633947250c6c1689c733f5..7794c7684e2a795cf10f922609016ed56976275a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,26 @@ +v0.1.1 14-11-2008 Stephan Bosch <stephan@rename-it.nl> + + * Re-enabled support for compiling against dovecot headers. Much like + cmusieve, command line tools like sievec and sieved are not compiled in this + case. + + + Improved logging of errors at specific occasions and added debug messages to + find script execution problems quicker. + + Removed code duplication between command line tools and the test suite. + Also restructured the sources of the tools. + + Added UTF-8 to UTF-7 folder name conversion for compatibility with IMAP. + + Created man pages for the command line tools. These are automatically + installed upon 'make install' + - Fixed compile error surfacing for gcc3.4. Forgot mask argument for the + open() system call when the O_CREAT flag is specified. Bug found by + Sergey Ivanov. + - Fixed bug in the sievec tool. -d output was always written to stdout. + - Fixed important bug in the imap4flags extension. When no :flags argument is + specified, the previous version would always use the final value of the + internal variable to set the flags. This means that modifications to the + internal variable also affected the bare fileinto/keep actions executed + earlier. This does not comply to the RFC. + v0.1.0 23-10-2008 Stephan Bosch <stephan@rename-it.nl> * Initial release diff --git a/README b/README index 6cfe7fd31c09f57e7ccb055a4cebf0235c6b7a17..56a87917a4517305f3a1d82ee98d37b27d32d503 100644 --- a/README +++ b/README @@ -54,12 +54,12 @@ Features Dovecot v1.2. Therefore, ManageSieve support can be added to Dovecot for the new Sieve plugin just as for the cmusieve plugin. -* Testsuite included: +* Test suite included: - This package includes a testsuite to automatically asses whether the compiled - sieve engine works correctly. The testsuite is an extension to the Sieve + This package includes a test suite to automatically asses whether the compiled + sieve engine works correctly. The test suite is an extension to the Sieve language and is therefore easily extended with new tests. Currently, the - testsuite is limited to testing script processing. The performed actions are + test suite is limited to testing script processing. The performed actions are not tested automatically yet. Implementation Status @@ -133,9 +133,9 @@ that no other files are written and no permission to do so is necessary for the global script directories. To test the sieve engine outside deliver it is useful to execute the commands -that exist in the src/sieve-tools/ directory of this package. After installation, -these are available at your $prefix/bin directory. The following commands are -installed: +that exist in the src/sieve-tools/ directory of this package. After +installation, these are available at your $prefix/bin directory. The following +commands are installed: -- diff --git a/src/lib-sieve/plugins/include/ext-include-variables.c b/src/lib-sieve/plugins/include/ext-include-variables.c index 6103f41ae1e6a09a6a5eed90709d6f2a64327806..2441801ce8cab928879a105a4f651a9302302aa0 100644 --- a/src/lib-sieve/plugins/include/ext-include-variables.c +++ b/src/lib-sieve/plugins/include/ext-include-variables.c @@ -60,7 +60,7 @@ struct sieve_variable *ext_include_variable_import_global struct ext_include_variable *varctx = (struct ext_include_variable *) impvar->context; sieve_command_validate_warning(valdtr, cmd, - "variable '%s' already imported earlier at line %d", variable, + "variable '%s' already imported earlier at line %d", variable, varctx->source_line); } } diff --git a/src/lib-sieve/sieve-script.c b/src/lib-sieve/sieve-script.c index 8186f4eb521bd8a6d671df6d29607d28824cdf78..01ed8739936427856829304b8b70d97c48fb35f1 100644 --- a/src/lib-sieve/sieve-script.c +++ b/src/lib-sieve/sieve-script.c @@ -38,14 +38,14 @@ static inline const char *_sieve_scriptfile_get_basename(const char *filename) static inline const char *_sieve_scriptfile_from_name(const char *name) { - const char *ext; + const char *ext; - /* See if it ends in .sieve already */ - ext = strrchr(name, '.'); - if ( ext == NULL || ext == name || strncmp(ext,".sieve",6) != 0 ) - return t_strconcat(name, ".sieve", NULL); + /* See if it ends in .sieve already */ + ext = strrchr(name, '.'); + if ( ext == NULL || ext == name || strncmp(ext,".sieve",6) != 0 ) + return t_strconcat(name, ".sieve", NULL); - return name; + return name; } /* @@ -86,10 +86,11 @@ struct sieve_script *sieve_script_init /* First obtain stat data from the system */ - if ( (ret=lstat(path, &st)) < 0 && (errno != ENOENT || exists_r == NULL) ) { + if ( (ret=lstat(path, &st)) < 0 ) { if ( errno == ENOENT ) { - sieve_error(ehandler, basename, "sieve script does not exist"); - if ( exists_r != NULL ) + if ( exists_r == NULL ) + sieve_error(ehandler, basename, "sieve script does not exist"); + else *exists_r = FALSE; } else sieve_critical(ehandler, basename, @@ -104,12 +105,11 @@ struct sieve_script *sieve_script_init /* Only create/init the object if it stat()s without problems */ if (S_ISLNK(st.st_mode)) { - if ( (ret=stat(path, &st)) < 0 && - (errno != ENOENT || exists_r == NULL) ) { - + if ( (ret=stat(path, &st)) < 0 ) { if ( errno == ENOENT ) { - sieve_error(ehandler, basename, "sieve script does not exist"); - if ( exists_r != NULL ) + if ( exists_r == NULL ) + sieve_error(ehandler, basename, "sieve script does not exist"); + else *exists_r = FALSE; } else sieve_critical(ehandler, basename,