提问人:Otto 提问时间:6/27/2023 更新时间:6/27/2023 访问量:36
在 dovecot 的电子邮件正文中创建垃圾邮件过滤规则时出错
Error creating spam filter rules in email body in dovecot
问:
我一直在应用以下规则,如果正文包含与以下“赚取免费资金”的任何引用或巧合,则将其标记为垃圾邮件:
`#if body :contains "earn free money" {
# fileinto "Junk";
# stop;
#}
#if anyof (
# header :matches "Subject" "earn free money",
# regex :matches ".*gana dinero*" "i" :content "text/plain"
#) {
# fileinto "Junk";
# stop;
#}
#if header :contains "Content-Type" "text/plain" {
# if allof (header :contains "Subject" "earn free money",
# anyof (header :matches "Content-Type" "*text/plain*",
# header :matches "Content-Type" "*text/html*"),
# anyof (body :contains "earn free money",
# body :matches ".*earn free money*"))
# {
# fileinto "Junk";
# stop;
# }
#}
注意:由于它生成的错误,它正在注释规则。
我运行规则:
sievec /etc/dovecot/sieve/spamfilter.sieve
我收到以下错误:
sievec(root): Debug: Effective uid=0, gid=0, home=/root
spamfilter: line 35: error: unknown test 'body' (only reported once at first occurrence).
spamfilter: error: validation failed.
sievec(root): Fatal: failed to compile sieve script '/etc/dovecot/sieve/spamfilter.sieve'
我正在使用 2.3.13 版本,显然它不再可用,我也执行了以下操作,我执行了以下代码来搜索与所需内容匹配的信息,但它没有找到任何东西,此外我已经逐个文件夹检查了,也没有:Dovecot
body module
sieve_extprograms
sudo find / -name "libdovecot_body_plugin.so"
在以下路径中,我找到了一个名为“Pigeonhole.Sieve.Plugins.Extprograms.txt”的文件: 我把信息留在这里,以防有用: https://jsfiddle.net/5wn2fray/dovecot-2.3.13\dovecot-2.3.13\doc\wiki
我有 SpamAssassin'Dovecot installed and configured to use
如果它不再可用,还有另一种选择,可以使用发送的有关所收到邮件的内容/正文的信息来过滤垃圾邮件。
答: 暂无答案
评论