mime-typesmimedovecotsieve-language

Sieve and MIME extension


I have a sieve filter which looks like:

require ["mime", "imap4flags"];

if header :mime :contenttype "Content-Type" "message/upload-notification"
{
   setflag "\\Seen";
}

when I try to complie it to a binary version for Dovecot I'm receiving an error:

97-upload-processed: line 1: error: require command: unknown Sieve capability `mime'.
97-upload-processed: line 3: error: unknown tagged argument ':mime' for the header test (reported only once at first occurrence).
97-upload-processed: error: validation failed.
sievec(root): Error: failed to compile sieve script '97-upload-processed.sieve'

Did I have missed something?


Solution

  • The MIME extension for pigeonhole sieve is quite new (the Wiki says it was added with pigeonhole v0.4.14 released April 2016, while the changelog says it was in v0.4.10 released December 2015).

    I was only able to retrieve the installed version of the installed pigeonhole version by querying /usr/include/dovecot/sieve/pigeonhole-config.h, you might find it under some different path, though.