[Dovecot] Optional Sieve includes

Anders mail at flac.kalibalik.dk
Mon Feb 25 21:45:53 EET 2008


I (think that I) want a global Sieve setup like this:

  require ["include"];
  include :global "spam.sieve";
  include :personal "folders.sieve";
  include :personal "vacation.sieve";

... that does not fail if a user has not created the personal filters. 
Any ideas how to do something like that?

I read the source, but it seems that a failed include will exit the
Sieve, so the above will not work.

Incidentally, I think I found a typo, so a patch is below.


Anders.



--- dovecot-sieve-1.1.4/src/sieve-cmu.c~        2008-02-16 19:24:51.000000000 +0100
+++ dovecot-sieve-1.1.4/src/sieve-cmu.c 2008-02-25 20:36:25.000000000 +0100
@@ -369,7 +369,7 @@
        if (isglobal) {
                script_dir = getenv("SIEVE_GLOBAL_DIR");
                if (script_dir == NULL) {
-                       i_info("include: global_script_dir not set "
+                       i_info("include: sieve_global_dir not set "
                               "(wanted script %s)", str_sanitize(script, 80));
                        return SIEVE_FAIL;
                }


More information about the dovecot mailing list