"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Mail/SpamAssassin/Message.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.

Message.pm  (Mail-SpamAssassin-3.4.4.tar.bz2):Message.pm  (Mail-SpamAssassin-3.4.5.tar.bz2)
skipping to change at line 135 skipping to change at line 135
if ($self->{suppl_attrib}) { # caller-provided additional information if ($self->{suppl_attrib}) { # caller-provided additional information
# pristine_body_length is currently used by an eval test check_body_length # pristine_body_length is currently used by an eval test check_body_length
# Possible To-Do: Base the length on the @message array later down? # Possible To-Do: Base the length on the @message array later down?
if (defined $self->{suppl_attrib}{body_size}) { if (defined $self->{suppl_attrib}{body_size}) {
# Optional info provided by a caller; should reflect the original # Optional info provided by a caller; should reflect the original
# message body size if provided, and as such it may differ from the # message body size if provided, and as such it may differ from the
# $self->{pristine_body} size, e.g. when the caller passed a truncated # $self->{pristine_body} size, e.g. when the caller passed a truncated
# message to SpamAssassin, or when counting line-endings differently. # message to SpamAssassin, or when counting line-endings differently.
$self->{pristine_body_length} = $self->{suppl_attrib}{body_size}; $self->{pristine_body_length} = $self->{suppl_attrib}{body_size};
dbg("message: set pristine_body_length from suppl_attrib: %s", $self->{pri stine_body_length});
} }
if (ref $self->{suppl_attrib}{mimepart_digests}) { if (ref $self->{suppl_attrib}{mimepart_digests}) {
# Optional info provided by a caller: an array of digest codes (e.g. SHA1) # Optional info provided by a caller: an array of digest codes (e.g. SHA1)
# of each MIME part. Should reflect the original message if provided. # of each MIME part. Should reflect the original message if provided.
# As such it may differ from digests calculated by get_mimepart_digests(), # As such it may differ from digests calculated by get_mimepart_digests(),
# e.g. when the caller passed a truncated message to SpamAssassin. # e.g. when the caller passed a truncated message to SpamAssassin.
$self->{mimepart_digests} = $self->{suppl_attrib}{mimepart_digests}; $self->{mimepart_digests} = $self->{suppl_attrib}{mimepart_digests};
dbg("message: set mimepart_digests from suppl_attrib");
} }
} }
bless($self,$class); bless($self,$class);
# create the metadata holder class # create the metadata holder class
$self->{metadata} = Mail::SpamAssassin::Message::Metadata->new($self); $self->{metadata} = Mail::SpamAssassin::Message::Metadata->new($self);
# Ok, go ahead and do the message "parsing" # Ok, go ahead and do the message "parsing"
skipping to change at line 981 skipping to change at line 983
last; last;
} }
elsif ($line_count && $body->[-$line_count] !~ /^[\041-\071\073-\176]+:/) { elsif ($line_count && $body->[-$line_count] !~ /^[\041-\071\073-\176]+:/) {
# if we aren't on an end boundary and there are still lines left, it # if we aren't on an end boundary and there are still lines left, it
# means we hit a new start boundary. therefore, the next line ought # means we hit a new start boundary. therefore, the next line ought
# to be a mime header. if it's not, mark it. # to be a mime header. if it's not, mark it.
$self->{'missing_mime_headers'} = 1; $self->{'missing_mime_headers'} = 1;
} }
} }
# Maximum parts to process # Maximum parts to process, simply skip the rest of the parts
if (++$partcnt == 1000) { if (++$partcnt == 1000) {
dbg("message: mimepart limit exceeded, stopping parsing"); dbg("message: mimepart limit exceeded, stopping parsing");
$self->{'mimepart_limit_exceeded'} = 1; $self->{'mimepart_limit_exceeded'} = 1;
return; return;
} }
# make sure we start with a new clean node # make sure we start with a new clean node
$in_body = 0; $in_body = 0;
$part_msg = Mail::SpamAssassin::Message::Node->new({ normalize=>$self->{no rmalize} }); $part_msg = Mail::SpamAssassin::Message::Node->new({ normalize=>$self->{no rmalize} });
undef $part_array; undef $part_array;
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added

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