You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2004/05/24 21:22:28 UTC
svn commit: rev 20372 - in incubator/spamassassin/trunk: lib/Mail/SpamAssassin rules
Author: jm
Date: Mon May 24 12:22:26 2004
New Revision: 20372
Modified:
incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
incubator/spamassassin/trunk/rules/70_testing.cf
Log:
some code from the weekend; fix UTF-8 warnings due to UTF-8-tainted data from HTML-Parser, and some interesting new ratware Received header rules
Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm (original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/HTML.pm Mon May 24 12:22:26 2004
@@ -923,6 +923,11 @@
sub html_text {
my ($self, $text) = @_;
+ # note: this comes back from HTML::Parser as UTF-8-tainted. Enforce byte
+ # mode by repacking the string in byte mode, to avoid 'Malformed UTF-8
+ # character (unexpected non-continuation byte)' warnings
+ $text = pack ("C0A*", $text);
+
# text that is not part of body
if (exists $self->{html}{inside_script} && $self->{html}{inside_script} > 0)
{
Modified: incubator/spamassassin/trunk/rules/70_testing.cf
==============================================================================
--- incubator/spamassassin/trunk/rules/70_testing.cf (original)
+++ incubator/spamassassin/trunk/rules/70_testing.cf Mon May 24 12:22:26 2004
@@ -239,6 +239,17 @@
describe T_DNS_FROM_RFC_WHOIS_A Envelope sender listed in whois.rfc-ignorant.org
tflags T_DNS_FROM_RFC_WHOIS_A net
+# ratware: forging Postfix Receiveds
+header T_RATWARE_RCVD_PF_1 Received =~ / \(Postfix\) with ESMTP id .+\; \S+ \d+ \S+ \d+ \d+:\d+:\d+ \S+$/s
+
+# faked AOLish headers
+header T_RATWARE_RCVD_98 Received =~ / \(v98\.\d\) with ESMTP id MAIL/
+
+header T_RATWARE_SMTPSVC_1 Received =~ / SMTPSVC\(5.0.2195.6713\);\n/s
+header T_RATWARE_SMTPSVC_2 Received =~ / SMTPSVC\(5.0.2195.6824\);\n/s
+
+header T_RATWARE_RCVD_AT Received =~ / by \S+\@\S+ with Microsoft SMTPSVC/
+
header T_DNS_FROM_RFC_WHOIS_B eval:check_rbl_sub('rfci_envfrom', '127.0.0.7')
describe T_DNS_FROM_RFC_WHOIS_B Envelope sender TLD in whois.rfc-ignorant.org
tflags T_DNS_FROM_RFC_WHOIS_B net