在 dovecot+sieve 中手动调用过滤

Are*_*nim 10 email email-server dovecot filtering sieve

我已经用筛网过滤配置了 dovecot(我也配置了圆形立方体,但我认为这并不重要)。

它工作正常,我已经设置了一些过滤器。但是现在我有一个巨大的未过滤的 INBOX 文件夹,我不想手动过滤它。

有什么办法可以说:“嘿,筛子!扫描指定用户的指定文件夹并对其调用一些过滤器!” ?

为两种协议启用了 Sieve 作为插件:lda 和 lmtp:

protocol lda {
  mail_plugins = $mail_plugins sieve
}

protocol lmtp {
  postmaster_address = postmaster@example.com
  mail_plugins = sieve
}
Run Code Online (Sandbox Code Playgroud)

小智 13

要在现有邮箱上执行过滤器,您可以sieve-filter从命令行手动运行。

要(干)在邮箱上example.sieve以用户身份运行筛选脚本,请使用以下命令:testINBOX

sieve-filter -v -C -u test /path/to/sieve/example.sieve 'INBOX'
Run Code Online (Sandbox Code Playgroud)

一旦您喜欢筛子将执行的操作,您可以通过添加-e执行脚本来执行脚本并-W授予筛子写入访问权限。

有关更多信息,请查看官方手册页:http : //pigeonhole.dovecot.org/doc/man1/sieve-filter.1.html