AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 982597
Accepted
davidgo
davidgo
Asked: 2019-09-10 13:42:29 +0800 CST2019-09-10 13:42:29 +0800 CST 2019-09-10 13:42:29 +0800 CST

这个 Spamassassin META 规则有什么问题?

  • 772

我 99.99% 确信这个规则集过去可以正常工作,但是如果最后的元规则未注释,就会开始抛出错误。这似乎与引擎有关,因为它发生在多个地方。

我 lint 时产生的错误是:

Sep 10 09:42:41.113 [3984] warn: config: Strange rule token: 0.01039
Sep 10 09:42:42.031 [3984] warn: lint: 1 issues detected, please rerun with debug enabled for more information

谁能帮忙告诉我为什么?

body            DG_CHINAREGSCAM2a       /we.received.an.application/i
describe        DG_CHINAREGSCAM2a       Words commonly used by China Scammers
score           DG_CHINAREGSCAM2a       0.01040

body            DG_CHINAREGSCAM2b       /their internet keyword/i
describe        DG_CHINAREGSCAM2b       Words commonly used by China Scammers
score           DG_CHINAREGSCAM2b       0.01041

body            DG_CHINAREGSCAM2c       /China(.*)domain name/i
describe        DG_CHINAREGSCAM2c       Words commonly used by China Scammers
score           DG_CHINAREGSCAM2c       0.01042

body            DG_CHINAREGSCAM2d       /necessary.to.send.email.to.you/i
describe        DG_CHINAREGSCAM2d       Words commonly used by China Scammers
score           DG_CHINAREGSCAM2d       0.01043

body            DG_CHINAREGSCAM2e       /company is associated with your company or not/i
describe        DG_CHINAREGSCAM2e       Words commonly used by China Scammers
score           DG_CHINAREGSCAM2e       0.01044

body            DG_CHINAREGSCAM2f       /conflicts.with.your.company/i
describe        DG_CHINAREGSCAM2f       Words commonly used by China Scammers
score           DG_CHINAREGSCAM2f       0.01045

#meta           DG_CHINAREGSCAM2        (( DG_CHINAREGSCAM2a + DG_CHINAREGSCAM2b + DG_CHINAREGSCAM2c + DG_CHINAREGSCAM2d + DG_CHINAREGSCAM2e + DG_CHINAREGSCAM2f) > 0.01039 )
#score          DG_CHINAREGSCAM2        3
#describe       DG_CHINAREGSCAM2        Email identified as China Registry Scam

在这种特殊情况下,我通过将 + / score 模型更改为使用“||”来解决此规则问题 对于任何规则的匹配,但这不适用于所有情况。

有没有解决这个问题,或者我看不到的明显原因?

spamassassin
  • 1 1 个回答
  • 548 Views

1 个回答

  • Voted
  1. Best Answer
    anx
    2019-09-11T09:55:33+08:002019-09-11T09:55:33+08:00

    linter 建议在算术元规则中使用倍数,而不是分数。

    我相信你的规则无论如何都有效.. 除了普通整数之外,没有必要使用任何东西,并且可能意味着编写规则时出现错误,见下文。说明您想要命中的匹配数(例如 2 个)并在必要时通过相乘来应用权重,例如:

    meta   DG_CHINAREGSCAM2 (( 7*DG_CHINAREGSCAM2a + 7*DG_CHINAREGSCAM2b + 7*DG_CHINAREGSCAM2c + 4*DG_CHINAREGSCAM2d + 4*DG_CHINAREGSCAM2e + 3*DG_CHINAREGSCAM2f) > 10 )
    

    它可能看起来像是附加score在其他测试上的算术 - 它不是。其他测试的每个引用都计为 1 的倍数:

    meta SYMBOLIC_TEST_NAME 布尔算术表达式

        Can also define an arithmetic expression in terms of other tests,
        with an unhit test having the value "0" and a hit test having a
        nonzero value.
        The value of a hit meta test is that of its
        arithmetic expression. The value of a hit eval test is that returned
        by its method.
        The value of a hit header, body, rawbody, uri, or
        full test which has the "multiple" tflag is the number of times the
        test hit. The value of any other type of hit test is "1".
    

    -文档/Mail_SpamAssassin_Conf.txt

    • 1

相关问题

  • 让 Postfix 以两种方式处理垃圾邮件

  • amavisd-new 是如何调用 spamassasin 的?

  • 在 Postfix 中的 virtual_alias 上运行 SpamAssassin

  • 我可以在 Exchange 2007 的服务器端强制执行邮件规则吗?

  • 如何最小化 SpamAssassin (spamd) 内存使用

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve