You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2006/07/10 22:27:49 UTC
svn commit: r420627 - /spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
Author: felicity
Date: Mon Jul 10 13:27:48 2006
New Revision: 420627
URL: http://svn.apache.org/viewvc?rev=420627&view=rev
Log:
found another non-text type that occurs in multipart/alternate mails, excluding from MULTIPART_ALT_NON_TEXT rule
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm?rev=420627&r1=420626&r2=420627&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm Mon Jul 10 13:27:48 2006
@@ -3082,13 +3082,16 @@
}
# came up on the users@ list, look for multipart/alternative parts which
-# include non-text parts -- skip multipart/related parts which occurs in ham
+# include non-text parts -- skip certain types which occur normally in ham
sub check_ma_non_text {
my $self = shift;
foreach my $map ($self->{msg}->find_parts(qr@^multipart/alternative$@i)) {
foreach my $p ($map->find_parts(qr/./, 1, 0)) {
- return 1 if ($p->{'type'} !~ m@^text/@i && $p->{'type'} !~ m@^multipart/related$@i);
+ next if (lc $p->{'type'} eq 'multipart/related');
+ next if (lc $p->{'type'} eq 'application/rtf');
+ next if ($p->{'type'} =~ m@^text/@i);
+ return 1;
}
}