【发布时间】:2020-02-25 05:42:33
【问题描述】:
我正在设置 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 正确检测到他们。
我的规则有什么问题?
【问题讨论】:
标签: regex email spam spam-prevention spamassassin