You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by gb...@apache.org on 2020/03/30 09:07:13 UTC

svn commit: r1875870 - /spamassassin/trunk/masses/rule-dev/seek-phrases-in-log

Author: gbechis
Date: Mon Mar 30 09:07:13 2020
New Revision: 1875870

URL: http://svn.apache.org/viewvc?rev=1875870&view=rev
Log:
make sought rules compatible with sa-compile

Modified:
    spamassassin/trunk/masses/rule-dev/seek-phrases-in-log

Modified: spamassassin/trunk/masses/rule-dev/seek-phrases-in-log
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/rule-dev/seek-phrases-in-log?rev=1875870&r1=1875869&r2=1875870&view=diff
==============================================================================
--- spamassassin/trunk/masses/rule-dev/seek-phrases-in-log (original)
+++ spamassassin/trunk/masses/rule-dev/seek-phrases-in-log Mon Mar 30 09:07:13 2020
@@ -449,6 +449,10 @@ sub assemble_regexps {
           $pat =~ s/\Q\[\\t\]\E/\\t/gs;
         }
 
+        if ($opt{ruletype} eq 'body') {
+          $pat =~ s/^\s/\\s/;
+        }
+
         if ($opt{ruletype} eq 'header') {
           print "$opt{ruletype} $opt{ruleprefix}${name}  ALL =~ /$pat/\n";
         } else {