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) {
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;
}