[Dovecot] First release (v0.1.0) of the new Sieve implementation for Dovecot v1.2
Hello Dovecot users,
Finally, after little more than a year, I finished the first release of the new Sieve implementation for Dovecot.
The main reason for rewriting the Sieve engine is to provide more reliable script execution and to provide better error messages to users and system administrators. Also, since the Sieve language evolves quickly, with new language extensions published every year, the aim is to provide support for quickly extending the engine with new features.
This implementation aims to comply to RFC8225 and it provides support for the following Sieve language extensions:
- fileinto
- reject
- envelope
- encoded-character
- vacation
- subaddress
- relational
- regex
- imap4flags
- copy
- include
- body
- variables
In comparison to the old CMU Sieve plugin, I added support for the very useful variables extension. However, the notify extension is notably missing. This will be implemented for next major release (0.2.x).
Refer to the README file for a full list of its features:
http://hg.rename-it.nl/dovecot-libsieve/raw-file/0.1.0/README
Installation
The source package is available as follows:
http://www.rename-it.nl/dovecot/1.2/dovecot-1.2-sieve-0.1.0.tar.gz http://www.rename-it.nl/dovecot/1.2/dovecot-1.2-sieve-0.1.0.tar.gz.sig
Alternatively, it can be cloned from the mercurial repository:
hg clone http://hg.rename-it.nl/dovecot-libsieve
The compilation procedure is identical to the cmusieve plugin (http://wiki.dovecot.org/LDA/Sieve). Don't forget to execute ./autogen.sh first if you obtained the sources through mercurial. This release will not compile against Dovecot versions older than v1.2.alpha3.
The configuration is very similar to the original plugin as well. The most notable difference is the name of the plugin, which is simply 'sieve' in stead of 'cmusieve'.
After compilation, the Sieve engine can be verified before deployment
using the included test suite. This is done by executing make test
in
the top of the source tree. The test suite is known to finish flawlessly
on the i386 and amd64 platforms. The test suite is not very
comprehensive yet, as it only tests the evaluation of scripts and omits
testing the actual execution of actions.
As this release contains about 30k effective lines of fresh code, bugs will eventually surface. Make sure that you provide enough information to reproduce the problem if you report bugs, i.e. the script and the mail message that caused the problem and/or relevant log entries.
Have fun testing the new Sieve plugin. Don't hesitate to notify me when there are problems.
Regards,
-- Stephan Bosch stephan@rename-it.nl IRC: Freenode, #dovecot, S[r]us
Finally, after little more than a year, I finished the first release of
the new Sieve implementation for Dovecot. Great! I immediately tried to put this into pkgsrc, but ...
The compilation procedure is identical to the cmusieve plugin
(http://wiki.dovecot.org/LDA/Sieve). I cannot see how this part of configure
if ! test -f "$dovecotdir/dovecot-config"; then echo echo "dovecot-config not found from $dovecotdir, use --with-dovecot=PATH" echo "to give path to compiled Dovecot sources or to a directory with the" echo "installed dovecot-config file." AC_MSG_ERROR([dovecot-config not found]) fi
if test -d "$dovecotdir/src"; then # compiling against sources have_dovecot_libs=yes else # compiling against installed headers echo echo "Cannot compile against the installed headers only." AC_MSG_ERROR([dovecot-source not found]); fi
is supposed to work. Either I point $dovecotdir to the source directory and get a complaint about a missing dovecot-config or I point it to the library directory and get a complaint that it can't compile against headers only.
Finally, after little more than a year, I finished the first release of
the new Sieve implementation for Dovecot. Great! I immediately tried to put this into pkgsrc, but ...The compilation procedure is identical to the cmusieve plugin
(http://wiki.dovecot.org/LDA/Sieve). I cannot see how this part of configure [SNIP] is supposed to work. Either I point $dovecotdir to the source directory and get a complaint about a missing dovecot-config or I point it to the library directory and get a complaint that it can't compile against headers only. Dovecot needs to be compiled first for this to work. The dovecot-config file is produced upon executing ./configure. This is no different from
Edgar Fuß wrote: the old cmusieve plugin.
However, it does indeed currently not allow you to build against dovecot headers only. I can change this for the next release, but then the sieve tools and the testsuite will not be compiled.
Regards,
Stephan
Dovecot needs to be compiled first for this to work. Yes, of course.
The dovecot-config file is produced upon executing ./configure. Not with me. I get a dovecot-config.in generated from dovecot-config.in.in during configure and a .../lib/dovecot/dovecot-config installed during install.
This is no different from the old cmusieve plugin. In pkgsrc, this was always built against headers only.
I can change this for the next release Would probably be nice.
Btw: What exactly does your sieve need dovecot sources for? It looks a bit hard to get this done correctly with pkgsrc. Do you just need an unpacked (patched?) source or does it have to be configured?
Dovecot needs to be compiled first for this to work. Yes, of course. If Dovecot is compiled, Dovecot's top source directory should contain
Edgar Fuß wrote: the dovecot-config file (as explained below). Strange that it is missing at your end.
The dovecot-config file is produced upon executing ./configure. Not with me. I get a dovecot-config.in generated from dovecot-config.in.in during configure and a .../lib/dovecot/dovecot-config installed during install. Oh yes sorry, indeed ./configure generates dovecot-config.in from dovecot-config.in.in (been a while since I looked at this). Upon executing 'make' it is transformed into the definitive dovecot-config using the following make rule (Makefile.am in top Dovecot source dir):
dovecot-config: dovecot-config.in Makefile
cat dovecot-config.in | sed
-e "s|^moduledir=|moduledir=$(moduledir)|"
-e "s|^dovecot_incdir=|dovecot_incdir=$(pkgincludedir)|" >
dovecot-config
So, if you are pointing dovecot-sieve's --with-dovecot to a completely built Dovecot source tree, it should find the dovecot-config file. If it is missing for some reason or you do not want to build dovecot completely, executing 'make dovecot-config' in the dovecot source tree should produce the dovecot-config file. However, as I explain below, a fully built Dovecot source tree is currently necessary to build the Sieve package.
This is no different from the old cmusieve plugin. In pkgsrc, this was always built against headers only.
I can change this for the next release Would probably be nice. I'll give it a look.
Btw: What exactly does your sieve need dovecot sources for? It looks a bit hard to get this done correctly with pkgsrc. Do you just need an unpacked (patched?) source or does it have to be configured? The sources are needed to build the command line tools like sievec, sieved and sieve-test. Also the testsuite needs it. So, if I change the package to allow building against the bare headers, these things cannot be compiled. For compilation of these tools and the testsuite, the fully built sources are needed because the Dovecot static libraries are linked into these binaries. If you care only for the Sieve plugin, this should not not matter.
BTW, I am wondering: did you do exactly the same for the old cmusieve before? And you didn't encounter any problems?
Regards,
Stephan.
Oh yes sorry, indeed ./configure generates dovecot-config.in from
dovecot-config.in.in (been a while since I looked at this). Upon
executing 'make' it is transformed into the definitive dovecot-config
using the following make rule (Makefile.am in top Dovecot source dir): Yes, after (pkgsrc) make build it's there.
For compilation of these tools and the testsuite, the fully built sources are needed because the Dovecot static libraries are linked
But these are all in .../lib/dovecot (/usr/pkg/lib/dovecot, in my case), aren't they?
If you care only for the Sieve plugin, this should not not matter. I'm mostly after the plugin.
BTW, I am wondering: did you do exactly the same for the old cmusieve
before? And you didn't encounter any problems? With cmusieve, $dovecotdir pointed to .../lib/dovecot, not the source tree.
Oh yes sorry, indeed ./configure generates dovecot-config.in from
dovecot-config.in.in (been a while since I looked at this). Upon
executing 'make' it is transformed into the definitive dovecot-config
using the following make rule (Makefile.am in top Dovecot source dir): Yes, after (pkgsrc) make build it's there.For compilation of these tools and the testsuite, the fully built sources are needed because the Dovecot static libraries are linked
But these are all in .../lib/dovecot (/usr/pkg/lib/dovecot, in my case), aren't they? Normally, the Dovecot libraries are not installed (just compiled in to
Edgar Fuß schreef: the various executables). Unless something was changed in the Makefile structure, that is still the case at your end. But, I have no experience with BSD or pkgsrc whatsoever, so I really wouldn't know for sure.
If you care only for the Sieve plugin, this should not not matter. I'm mostly after the plugin.
BTW, I am wondering: did you do exactly the same for the old cmusieve
before? And you didn't encounter any problems? With cmusieve, $dovecotdir pointed to .../lib/dovecot, not the source tree. I have re-enabled the support for compiling dovecot-libsieve against Dovecot headers:
http://hg.rename-it.nl/dovecot-libsieve/rev/36e00217bdd2
From what I've understood from you thus far, this should give you the ability to compile it again as you did before with cmusieve.
Regards,
-- Stephan Bosch stephan@rename-it.nl
participants (2)
-
Edgar Fuß
-
Stephan Bosch