Spamassassin 的自定义规则(用于主题行过滤)不起作用

Spamassassin's custom rule (for subject line filtering) doesn't work

我正在设置 Spamassassin 以与 isbg 一起使用来过滤我的 IMAP 邮件帐户中的邮件。我的 ISP 已经有一个非常好的垃圾邮件过滤器,可以在它检测到的每封邮件的主题行前面添加 "[SPAM]";因此,我在 Spamassassin 中设置了一个自定义规则,以便它为主题行以“[SPAM]”开头的任何邮件添加高分。我的 user_prefs 文件是:

 required_score     9
 score HTML_COMMENT_8BITS   0
 score UPPERCASE_25_50      0
 score UPPERCASE_50_75      0
 score UPPERCASE_75_100 0
 score OBSCURED_EMAIL          0

 score SUBJ_ILLEGAL_CHARS      0

header SPAM_FILTRADO    Subject =~ /^\s*\[SPAM\]/
score  SPAM_FILTRADO    20

然而,当我向它发送垃圾邮件来测试它时,它似乎并没有触发我的规则。我用这个主题行给它一个电子邮件,例如:

Subject: [SPAM] See Drone X Pro in action

而我是这样分析的:

[paulo@myserver mails]$ spamc -R < spam7.txt 
9.3/9.0
Spam detection software, running on the system "myserver", has
identified this incoming email as possible spam.  The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email.  If you have any questions, see
@@CONTACT_ADDRESS@@ for details.

Content preview:  Big Drone Companies Are Terrified Of This New Drone That Hit
   The Market <http://www.fairfood.icu/uisghougw/pjarx44255sweouci/I31AAdtTTKmLsu_A6Dq7ZK_a47Ko45fCRXk7Fr9fqm4/BbYMgcZjieuj_YxMOSmnXetiI6e4Z37yS9H2zVIeHEilOpatuk8V8Mt0EtJDfLLE1llzj6MiwlLzR99DGODekcqeM7kn63lcFcp8fJutAsw>
   [...] 

Content analysis details:   (9.3 points, 9.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 2.4 DNS_FROM_AHBL_RHSBL    RBL: Envelope sender listed in dnsbl.ahbl.org
 2.7 RCVD_IN_PSBL           RBL: Received via a relay in PSBL
                            [193.17.4.113 listed in psbl.surriel.com]
-0.0 SPF_PASS               SPF: sender matches SPF record
 1.3 HTML_IMAGE_ONLY_24     BODY: HTML: images with 2000-2400 bytes of words
 0.0 HTML_MESSAGE           BODY: HTML included in message
 1.6 RCVD_IN_BRBL_LASTEXT   RBL: RCVD_IN_BRBL_LASTEXT
                            [193.17.4.113 listed in bb.barracudacentral.org]
 1.3 RDNS_NONE              Delivered to internal network by a host with no rDNS

我的规则没有任何内容。

我知道我的 user_prefs 正在加载,因为在我上面粘贴的部分之后,我在白名单中设置了一些电子邮件地址,并且在分析时来自这些地址的电子邮件,Spamassassin 会正确检测到它们。

我的规则有什么问题?

user_prefs 文件中自定义规则的支持默认关闭。
您可以在全局配置中使用item_allow_user_rules来更改它。