"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Mail/SpamAssassin/Conf/Parser.pm" between
Mail-SpamAssassin-3.4.4.tar.bz2 and Mail-SpamAssassin-3.4.5.tar.bz2

About: SpamAssassin is a mail filter that uses a wide range of heuristic tests on mail headers and body text to identify "spam" (also known as unsolicited commercial email) incl. Bayesian (statistical) spam filter and several internet-based realtime blacklists.

Parser.pm  (Mail-SpamAssassin-3.4.4.tar.bz2):Parser.pm  (Mail-SpamAssassin-3.4.5.tar.bz2)
skipping to change at line 1247 skipping to change at line 1247
} }
$conf->{test_qrs}->{$name} = $rec; $conf->{test_qrs}->{$name} = $rec;
} }
elsif ($type == $Mail::SpamAssassin::Conf::TYPE_HEAD_TESTS) elsif ($type == $Mail::SpamAssassin::Conf::TYPE_HEAD_TESTS)
{ {
local($1,$2,$3); local($1,$2,$3);
# RFC 5322 section 3.6.8, ftext printable US-ASCII chars not including ":" # RFC 5322 section 3.6.8, ftext printable US-ASCII chars not including ":"
# no re "strict"; # since perl 5.21.8: Ranges of ASCII printables... # no re "strict"; # since perl 5.21.8: Ranges of ASCII printables...
if ($text =~ /^exists:(.*)/) { if ($text =~ /^exists:(.*)/) {
my $hdr = $1; my $hdr = $1;
# never evaled, so can be quite generous with the name
# check :addr etc header options # check :addr etc header options
if ($hdr !~ /^[^:\s]+:?$/) { # $hdr used in eval text, validate carefully
if ($hdr !~ /^[\w.-]+:?$/) {
$self->lint_warn("config: invalid head test $name header: $hdr"); $self->lint_warn("config: invalid head test $name header: $hdr");
return; return;
} }
$hdr =~ s/:$//; $hdr =~ s/:$//;
$conf->{test_opt_header}->{$name} = $hdr; $conf->{test_opt_header}->{$name} = $hdr;
$conf->{test_opt_exists}->{$name} = 1; $conf->{test_opt_exists}->{$name} = 1;
} else { } else {
if ($text !~ /^([^:\s]+(?:\:|(?:\:[a-z]+){1,2})?)\s*([=!]~)\s*(.+)$/) { # $hdr used in eval text, validate carefully
if ($text !~ /^([\w.-]+(?:\:|(?:\:[a-z]+){1,2})?)\s*([=!]~)\s*(.+)$/) {
$self->lint_warn("config: invalid head test $name: $text"); $self->lint_warn("config: invalid head test $name: $text");
return; return;
} }
my ($hdr, $op, $pat) = ($1, $2, $3); my ($hdr, $op, $pat) = ($1, $2, $3);
$hdr =~ s/:$//; $hdr =~ s/:$//;
if ($pat =~ s/\s+\[if-unset:\s+(.+)\]$//) { if ($pat =~ s/\s+\[if-unset:\s+(.+)\]$//) {
$conf->{test_opt_unset}->{$name} = $1; $conf->{test_opt_unset}->{$name} = $1;
} }
my ($rec, $err) = compile_regexp($pat, 1, $ignore_amre); my ($rec, $err) = compile_regexp($pat, 1, $ignore_amre);
if (!$rec) { if (!$rec) {
 End of changes. 3 change blocks. 
3 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)