Add ^ before header to avoid partial matches
authorJamie Cameron <jcameron@webmin.com>
Mon, 6 Sep 2010 19:13:50 +0000 (12:13 -0700)
committerJamie Cameron <jcameron@webmin.com>
Mon, 6 Sep 2010 19:13:50 +0000 (12:13 -0700)
filter/filter-lib.pl

index 96bafe8..3926162 100755 (executable)
@@ -224,10 +224,10 @@ if ($filter->{'condspam'}) {
        }
 elsif ($filter->{'condlevel'}) {
        local $stars = join("", map { "\\*" } (1..$filter->{'condlevel'}));
-       @conds = ( [ "", "X-Spam-Level: $stars" ] );
+       @conds = ( [ "", "^"."X-Spam-Level: $stars" ] );
        }
 elsif ($filter->{'condheader'}) {
-       @conds = ( [ "", $filter->{'condheader'}.": ".
+       @conds = ( [ "", "^".$filter->{'condheader'}.": ".
                         $filter->{'condvalue'} ] );
        }
 elsif ($filter->{'condtype'} eq '<' || $filter->{'condtype'} eq '>') {