diff --git a/configure.in b/configure.in index 5743c4e32b23bd5c0ca4d23d5ecc63d67ad8983b..06268f81985b3d30b9a0b5142f8f634c587ce0fd 100644 --- a/configure.in +++ b/configure.in @@ -40,6 +40,22 @@ else fi AM_CONDITIONAL(HAVE_DOVECOT_LIBS, test "$have_dovecot_libs" = "yes") +# Extensions under development +# + +AC_ARG_WITH(enotify, +[AC_HELP_STRING([--with-enotify], [Build enotify extension (under development) [default=no]])], + if test x$withval = xno || test x$withval = xauto; then + want_enotify=$withval + else + want_enotify=yes + fi, + want_enotify=no) +AM_CONDITIONAL(BUILD_ENOTIFY, test "$want_enotify" = "yes") + +# +# + dnl replace relative ../ paths in the file with full paths eval `cat $dovecotdir/dovecot-config|sed 's,\$(top_builddir)/,$dovecotdir/,g'` @@ -69,6 +85,7 @@ src/lib-sieve/plugins/copy/Makefile src/lib-sieve/plugins/include/Makefile src/lib-sieve/plugins/body/Makefile src/lib-sieve/plugins/variables/Makefile +src/lib-sieve/plugins/enotify/Makefile src/plugins/Makefile src/plugins/lda-sieve/Makefile src/sieve-bin/Makefile diff --git a/src/lib-sieve/plugins/Makefile.am b/src/lib-sieve/plugins/Makefile.am index 6db6a5e29fe0885afa1f32a56b20fd2394fa807d..0aaa153b76aad07b01053ddfda0de70c0701d7dc 100644 --- a/src/lib-sieve/plugins/Makefile.am +++ b/src/lib-sieve/plugins/Makefile.am @@ -1,2 +1,17 @@ -SUBDIRS = vacation subaddress comparator-i-ascii-numeric relational regex imapflags copy include body variables +if BUILD_ENOTIFY +ENOTIFY = enotify +endif + +SUBDIRS = \ + vacation \ + subaddress \ + comparator-i-ascii-numeric \ + relational \ + regex \ + imapflags \ + copy \ + include \ + body \ + variables \ + $(ENOTIFY) diff --git a/src/lib-sieve/plugins/enotify/Makefile.am b/src/lib-sieve/plugins/enotify/Makefile.am new file mode 100644 index 0000000000000000000000000000000000000000..38e0a66ee8a6054f5238ba14f500fd70c72c0594 --- /dev/null +++ b/src/lib-sieve/plugins/enotify/Makefile.am @@ -0,0 +1,11 @@ +noinst_LTLIBRARIES = libsieve_ext_enotify.la + +AM_CPPFLAGS = \ + -I../../ \ + -I$(dovecot_incdir) \ + -I$(dovecot_incdir)/src/lib \ + -I$(dovecot_incdir)/src/lib-mail \ + -I$(dovecot_incdir)/src/lib-storage + +libsieve_ext_enotify_la_SOURCES = \ + ext-enotify.c diff --git a/src/lib-sieve/plugins/enotify/ext-enotify.c b/src/lib-sieve/plugins/enotify/ext-enotify.c new file mode 100644 index 0000000000000000000000000000000000000000..d9fc0d0cfbafc10b3cb08feea7eed8ce62e0666e --- /dev/null +++ b/src/lib-sieve/plugins/enotify/ext-enotify.c @@ -0,0 +1,57 @@ +/* Copyright (c) 2002-2008 Dovecot Sieve authors, see the included COPYING file + */ + +/* Extension enotify + * ------------------ + * + * Authors: Stephan Bosch + * Specification: draft-ietf-sieve-notify-12.txt + * Implementation: skeleton + * Status: under development + * + */ + +#include <stdio.h> + +#include "sieve-common.h" + +#include "sieve-code.h" +#include "sieve-extensions.h" +#include "sieve-actions.h" +#include "sieve-commands.h" +#include "sieve-validator.h" +#include "sieve-generator.h" +#include "sieve-interpreter.h" +#include "sieve-result.h" + +/* + * Extension + */ + +static bool ext_enotify_load(int ext_id); +static bool ext_enotify_validator_load(struct sieve_validator *validator); + +static int ext_my_id; + +const struct sieve_extension enotify_extension = { + "enotify", + &ext_my_id, + ext_enotify_load, + ext_enotify_validator_load, + NULL, NULL, NULL, NULL, NULL, + SIEVE_EXT_DEFINE_NO_OPERATIONS, + SIEVE_EXT_DEFINE_NO_OPERANDS +}; + +static bool ext_enotify_load(int ext_id) +{ + ext_my_id = ext_id; + + return TRUE; +} + +static bool ext_enotify_validator_load(struct sieve_validator *validator) +{ + return TRUE; +} +