You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2022/04/26 17:35:35 UTC

svn commit: r1900294 - /spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Bayes.pm

Author: hege
Date: Tue Apr 26 17:35:35 2022
New Revision: 1900294

URL: http://svn.apache.org/viewvc?rev=1900294&view=rev
Log:
Minor fixes

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Bayes.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Bayes.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Bayes.pm?rev=1900294&r1=1900293&r2=1900294&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Bayes.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Plugin/Bayes.pm Tue Apr 26 17:35:35 2022
@@ -1448,6 +1448,10 @@ sub _tokenize_headers {
     elsif ($hdr =~ /^${MARK_PRESENCE_ONLY_HDRS}$/i) {
       $val = "1"; # just mark the presence, they create lots of hapaxen
     }
+    elsif ($hdr =~ /^x-spam-relays-(?:external|internal|trusted|untrusted)$/) {
+      # remove redundant rdns helo ident envfrom intl auth msa words
+      $val =~ s/ [a-z]+=/ /g;
+    }
 
     if (MAP_HEADERS_MID) {
       if ($hdr =~ /^(?:In-Reply-To|References|Message-ID)$/i) {
@@ -1511,7 +1515,7 @@ sub _pre_chew_content_type {
   }
 
   # stop-list words for Content-Type header: these wind up totally gray
-  $val =~ s/\b(?:text|charset)\b//;
+  $val =~ s/\b(?:text|charset)\b/ /g;
 
   $val;
 }