Sieve 和 MIME 扩展

Sieve and MIME extension

我有一个筛子过滤器,它看起来像:

require ["mime", "imap4flags"];

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

当我尝试将其编译为 Dovecot 的二进制版本时,我收到错误消息:

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'

我是不是漏掉了什么?

pigeonhole sieve 的 MIME 扩展非常新(Wiki says it was added with pigeonhole v0.4.14 released April 2016, while the changelog says it was in v0.4.10 于 2015 年 12 月发布)。

我只能通过查询 /usr/include/dovecot/sieve/pigeonhole-config.h 来检索已安装的 pigeonhole 版本的安装版本,不过你可能会在其他路径下找到它。