osdir.com
mailing list archive

Subject: [SACVS] CVS: spamassassin/lib/Mail/SpamAssassin Dns.pm,1.79,1.80 - msg#00405

List: mail.spam.spamassassin.cvs

Date: Prev Next Index Thread: Prev Next Index
Update of /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin
In directory sc8-pr-cvs1:/tmp/cvs-serv19780/lib/Mail/SpamAssassin

Modified Files:
Dns.pm
Log Message:
There seem to be sometimes where Razor2 doesn't think it gets a request,
and therefore doesn't set 'spam' properly leading to an undefined warning
further down the code. Until I can track down the problem, I've put in
a kluge which basically just sets the result to 0 if it's undefined.



Index: Dns.pm
===================================================================
RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/Dns.pm,v
retrieving revision 1.79
retrieving revision 1.80
diff -b -w -u -d -r1.79 -r1.80
--- Dns.pm 23 Dec 2002 13:40:47 -0000 1.79
+++ Dns.pm 30 Dec 2002 01:15:33 -0000 1.80
@@ -425,11 +425,11 @@
alarm 0;

# so $objects->[0] is the first (only) message, and ->{spam} is a
general yes/no
- $self->{razor2_result} = $response = $objects->[0]->{spam};
+ $self->{razor2_result} = $response = $objects->[0]->{spam} || 0;
# good for debugging, but leave this off!
#use Data::Dumper;
#print Dumper($objects),"\n";
- #
+
# ->{p} is for each part of the message
# so go through each part, taking the highest cf we find
# of any part that isn't contested (ct). This helps avoid false



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf


Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

[SACVS] CVS: spamassassin/rules 70_cvs_rules_under_test.cf,1.324,1.325

Update of /cvsroot/spamassassin/spamassassin/rules In directory sc8-pr-cvs1:/tmp/cvs-serv7365/rules Modified Files: 70_cvs_rules_under_test.cf Log Message: small revisions to INVALID_MSGID stuff Index: 70_cvs_rules_under_test.cf =================================================================== RCS file: /cvsroot/spamassassin/spamassassin/rules/70_cvs_rules_under_test.cf,v retrieving revision 1.324 retrieving revision 1.325 diff -b -w -u -d -r1.324 -r1.325 --- 70_cvs_rules_under_test.cf 29 Dec 2002 18:46:54 -0000 1.324 +++ 70_cvs_rules_under_test.cf 30 Dec 2002 00:23:04 -0000 1.325 @@ -60,11 +60,24 @@ # bad offenders. I wish RFC 2822 allowed a smaller set of characters # here. The idea here is to not worry about the exact set of special # characters that are allowed, but to focus on the really bad ones. +# +# quinlan: this is the set of characters that appear in spam, not in +# ham, and are disallowed by RFC 2822 +# +# hex character +# 22 " note that "foo" is allowed +# 2c , not as common in spam +# 3a : note tvd has FPs for this one +# 3b ; not as common in spam +# 3c < okay at front +# 3e > okay at end +# 5c \ +# header __SANE_MSGID_1 MESSAGEID =~ /^<\S+\@\S+>\s*$/m header __SANE_MSGID_2 MESSAGEID =~ /^<[^ \t\n\r\x0b\x80-\xff]+\@[^ \t\n\r\x0b\x80-\xff]+>\s*$/m header __SANE_MSGID_3 MESSAGEID =~ /^<[^<> \t\n\r\x0b\x80-\xff]+\@[^<> \t\n\r\x0b\x80-\xff]+>\s*$/m -header __SANE_MSGID_4 MESSAGEID =~ /^<(?:\S+|\".+\")\@(?:\S+|\[\d{1,3}(?:\.\d{1,3}){3}\])>\s*$/m [if-unset: <NO@MSGID>] -header __SANE_MSGID_5 MESSAGEID =~ /^<(?:\S+|\".+\")+\@(?:\S+|\[\d{1,3}(?:\.\d{1,3}){3}\])>\s*$/m [if-unset: <NO@MSGID>] +header __SANE_MSGID_4 MESSAGEID =~ /^<[^<>\\ \t\n\r\x0b\x80-\xff]+\@[^<>\\ \t\n\r\x0b\x80-\xff]+>\s*$/m +header __SANE_MSGID_5 MESSAGEID =~ /^<[^<>\\,; \t\n\r\x0b\x80-\xff]+\@[^<>\\,; \t\n\r\x0b\x80-\xff]+>\s*$/m # header __SPECIAL_MSGID MESSAGEID =~ /\(.*\)|\".*\"/m # ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf

Next Message by Date: click to view message preview

[SACVS] CVS: spamassassin/lib/Mail/SpamAssassin Dns.pm,1.80,1.81

Update of /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin In directory sc8-pr-cvs1:/tmp/cvs-serv24773/lib/Mail/SpamAssassin Modified Files: Dns.pm Log Message: the razor2 problem seemed to be related to having a dos formatted file. razor-check doesn't seem to have any issues checking it, but through spamassassin, razor would see 1 big header. the solution is to replace the lf/cr/lf combo with just lf/lf. That makes the blank line between header and body blank, and razor works nicely for SA then. Index: Dns.pm =================================================================== RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/Dns.pm,v retrieving revision 1.80 retrieving revision 1.81 diff -b -w -u -d -r1.80 -r1.81 --- Dns.pm 30 Dec 2002 01:15:33 -0000 1.80 +++ Dns.pm 30 Dec 2002 01:40:05 -0000 1.81 @@ -393,6 +393,11 @@ $rc->{opt} = \%opt; $rc->do_conf() or die $rc->errstr; + # If we're a DOS formatted file, make sure the blank line between + # header and body has a carriage return (\r) in it. This seems to + # confuse Razor, so let's get rid of it. + $$fulltext =~ s/\n\r\n/\n\n/; + my @msg = ($fulltext); my $objects = $rc->prepare_objects( \@msg ) or die "error in prepare_objects"; ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf

Previous Message by Thread: click to view message preview

[SACVS] CVS: spamassassin/rules 70_cvs_rules_under_test.cf,1.324,1.325

Update of /cvsroot/spamassassin/spamassassin/rules In directory sc8-pr-cvs1:/tmp/cvs-serv7365/rules Modified Files: 70_cvs_rules_under_test.cf Log Message: small revisions to INVALID_MSGID stuff Index: 70_cvs_rules_under_test.cf =================================================================== RCS file: /cvsroot/spamassassin/spamassassin/rules/70_cvs_rules_under_test.cf,v retrieving revision 1.324 retrieving revision 1.325 diff -b -w -u -d -r1.324 -r1.325 --- 70_cvs_rules_under_test.cf 29 Dec 2002 18:46:54 -0000 1.324 +++ 70_cvs_rules_under_test.cf 30 Dec 2002 00:23:04 -0000 1.325 @@ -60,11 +60,24 @@ # bad offenders. I wish RFC 2822 allowed a smaller set of characters # here. The idea here is to not worry about the exact set of special # characters that are allowed, but to focus on the really bad ones. +# +# quinlan: this is the set of characters that appear in spam, not in +# ham, and are disallowed by RFC 2822 +# +# hex character +# 22 " note that "foo" is allowed +# 2c , not as common in spam +# 3a : note tvd has FPs for this one +# 3b ; not as common in spam +# 3c < okay at front +# 3e > okay at end +# 5c \ +# header __SANE_MSGID_1 MESSAGEID =~ /^<\S+\@\S+>\s*$/m header __SANE_MSGID_2 MESSAGEID =~ /^<[^ \t\n\r\x0b\x80-\xff]+\@[^ \t\n\r\x0b\x80-\xff]+>\s*$/m header __SANE_MSGID_3 MESSAGEID =~ /^<[^<> \t\n\r\x0b\x80-\xff]+\@[^<> \t\n\r\x0b\x80-\xff]+>\s*$/m -header __SANE_MSGID_4 MESSAGEID =~ /^<(?:\S+|\".+\")\@(?:\S+|\[\d{1,3}(?:\.\d{1,3}){3}\])>\s*$/m [if-unset: <NO@MSGID>] -header __SANE_MSGID_5 MESSAGEID =~ /^<(?:\S+|\".+\")+\@(?:\S+|\[\d{1,3}(?:\.\d{1,3}){3}\])>\s*$/m [if-unset: <NO@MSGID>] +header __SANE_MSGID_4 MESSAGEID =~ /^<[^<>\\ \t\n\r\x0b\x80-\xff]+\@[^<>\\ \t\n\r\x0b\x80-\xff]+>\s*$/m +header __SANE_MSGID_5 MESSAGEID =~ /^<[^<>\\,; \t\n\r\x0b\x80-\xff]+\@[^<>\\,; \t\n\r\x0b\x80-\xff]+>\s*$/m # header __SPECIAL_MSGID MESSAGEID =~ /\(.*\)|\".*\"/m # ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf

Next Message by Thread: click to view message preview

[SACVS] CVS: spamassassin/lib/Mail/SpamAssassin Dns.pm,1.80,1.81

Update of /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin In directory sc8-pr-cvs1:/tmp/cvs-serv24773/lib/Mail/SpamAssassin Modified Files: Dns.pm Log Message: the razor2 problem seemed to be related to having a dos formatted file. razor-check doesn't seem to have any issues checking it, but through spamassassin, razor would see 1 big header. the solution is to replace the lf/cr/lf combo with just lf/lf. That makes the blank line between header and body blank, and razor works nicely for SA then. Index: Dns.pm =================================================================== RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/Dns.pm,v retrieving revision 1.80 retrieving revision 1.81 diff -b -w -u -d -r1.80 -r1.81 --- Dns.pm 30 Dec 2002 01:15:33 -0000 1.80 +++ Dns.pm 30 Dec 2002 01:40:05 -0000 1.81 @@ -393,6 +393,11 @@ $rc->{opt} = \%opt; $rc->do_conf() or die $rc->errstr; + # If we're a DOS formatted file, make sure the blank line between + # header and body has a carriage return (\r) in it. This seems to + # confuse Razor, so let's get rid of it. + $$fulltext =~ s/\n\r\n/\n\n/; + my @msg = ($fulltext); my $objects = $rc->prepare_objects( \@msg ) or die "error in prepare_objects"; ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by