Hi Dennis, On 6/12/2011 3:55 PM, Dennis Schridde wrote:
Hello everyone!
I just released dovecot-metadata-8, which is an implementation of RFC 5464 (IMAP METADATA), allowing to add comments/annotations/metadata to folders of an email account.
Nice! I've browsed the source a little and I compiled it, but I haven't actually tested it yet. However, I have a few comments/requests already.
The build process is pretty much straightforward, just make sure you have the dovecot headers available on your system: ./autogen.sh ./configure --with-dovecot=/path/to/dovecot make make install
I had some compile problems. First of all, my Debian stable has automake 1.10 and thus does not support the new silent-rules feature. I'd suggest the following patch to maintain backwards compatibility for the time being: diff -r 8077ad9bce6f configure.ac --- a/configure.ac Sun Jun 12 13:54:06 2011 +0200 +++ b/configure.ac Mon Jun 20 10:36:29 2011 +0200 @@ -1,7 +1,9 @@ AC_PREREQ(2.65) AC_INIT([dovecot-metadata],[8],[devurandom@gmx.net]) -AM_INIT_AUTOMAKE([1.10 silent-rules]) +AM_INIT_AUTOMAKE([1.10]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) + AM_MAINTAINER_MODE AC_CONFIG_MACRO_DIR([m4]) Also, I usually like to compile against an uninstalled Dovecot source tree, e.g. to perform tests without installing anything. This failed because the currently installed dovecot.m4 does not provide LIBDOVECOT_IMAP_INCLUDE. Timo, could you fix this? diff -r 327486d79620 dovecot.m4 --- a/dovecot.m4 Thu Jun 16 16:37:42 2011 +0300 +++ b/dovecot.m4 Mon Jun 20 10:33:29 2011 +0200 @@ -62,7 +62,7 @@ AX_SUBST_L([DOVECOT_CFLAGS], [DOVECOT_LIBS], [DOVECOT_SSL_LIBS], [DOVECOT_SQL_LIBS]) AX_SUBST_L([LIBDOVECOT], [LIBDOVECOT_LOGIN], [LIBDOVECOT_SQL], [LIBDOVECOT_LDA], [LIBDOVECOT_STORAGE]) AX_SUBST_L([LIBDOVECOT_DEPS], [LIBDOVECOT_LOGIN_DEPS], [LIBDOVECOT_SQL_DEPS], [LIBDOVECOT_LDA_DEPS], [LIBDOVECOT_STORAGE_DEPS]) - AX_SUBST_L([LIBDOVECOT_INCLUDE], [LIBDOVECOT_LDA_INCLUDE], [LIBDOVECOT_SERVICE_INCLUDE], [LIBDOVECOT_STORAGE_INCLUDE], [LIBDOVECOT_LOGIN_INCLUDE], [LIBDOVECOT_CONFIG_INCLUDE]) + AX_SUBST_L([LIBDOVECOT_INCLUDE], [LIBDOVECOT_LDA_INCLUDE], [LIBDOVECOT_SERVICE_INCLUDE], [LIBDOVECOT_STORAGE_INCLUDE], [LIBDOVECOT_LOGIN_INCLUDE], [LIBDOVECOT_CONFIG_INCLUDE], [LIBDOVECOT_IMAP_INCLUDE]) DC_PLUGIN_DEPS ]) The fact that this package relies on an installed dovecot.m4 also makes compiling against an uninstalled source tree a bit of a chicken-egg problem. Pigeonhole includes a version of dovecot.m4 (albeit modified) in the distribution for this purpose, but I am not sure that is the best solution. Also, since compiling against an uninstalled Dovecot currently has no real purpose for this package for now (it may have when I implement the related Sieve features as discussed below), I would not give fixing this any priority at all.
If you find any bugs (crashes, incompatibilities with RFC 5464, etc), please write me a mail. Be advised that this code is still experimental and might crash your server!
Now that Dovecot has IMAP METADATA support, it would be nice to implement the Sieve side of the story as well. This is specified in RFC5490 (http://tools.ietf.org/html/rfc5490). These Sieve language extensions allow matching against server and mailbox annotations in Sieve scripts. To build Sieve plugins for the aforementioned features, I would need to have access to the metadata backend to read the annotation entries. For that reason, I would like to suggest that you put the metadata storage backend in a separate shared library, such that other future plugins and tools can link against it to gain access to the metadata storage. Pigeonhole does something similar already; the Sieve interpreter is installed as /usr/lib/dovecot/libdovecot-sieve.so and the LDA plugin makes use of it, as do command line tools such as sieve-test. Regards, Stephan