]> git.donarmstrong.com Git - debbugs.git/blobdiff - bin/debbugs-spam
allow specifying the dist in source_to_binary (for DB actions)
[debbugs.git] / bin / debbugs-spam
index a24c02a3e8f20f4ad28efc0c554aa9f8ea68b0e3..09077e0acccac2a0c842caf0df07b6cea79ab520 100755 (executable)
@@ -202,10 +202,10 @@ sub mark_it {
                        my $body = $rec->{text};
                        my ($subject) = $body =~ /^Subject: *(.+)$/mi;
                        my $is_match = 0;
-                       if ($subject =~ /\Q$regex\E/) {
+                       if ($subject =~ /$regex/) {
                            $is_match = 1;
                        }
-                       if ($mid =~ /\Q$regex\E/) {
+                       if ($mid =~ /$regex/) {
                            $is_match = 1;
                        }
                        if ($is_match) {
@@ -373,7 +373,7 @@ sub spam_score {
         while (<$spamc_out>) {
             if (/^X-Spam/) {
                 $report .= $_;
-                if (/^X-Spam-Status: (Yes|No), score=([\d\.]+) required=([\d\.]+)/) {
+                if (/^X-Spam-Status: (Yes|No), score=(-?[\d\.]+) required=(-?[\d\.]+)/) {
                     $threshold = $3;
                     $score = $2;
                 }