diff options
author | Wesley Shields <wxs@FreeBSD.org> | 2008-01-15 23:08:41 +0000 |
---|---|---|
committer | Wesley Shields <wxs@FreeBSD.org> | 2008-01-15 23:08:41 +0000 |
commit | 8b4db7eb1e4e9d5642bb67975e1ebacaccd5004c (patch) | |
tree | c7eea01962acda9988c05361c0f954fc2e31b7a3 /mail/p5-Mail-SpamAssassin/files | |
parent | - Fix <name> sections from both previous committs (diff) |
Update to 3.2.4.
PR: 119448
Submitted by: Michael Scheidell <scheidell@secnap.net> (maintainer)
Approved by: garga (mentor)
Notes
Notes:
svn path=/head/; revision=205713
Diffstat (limited to 'mail/p5-Mail-SpamAssassin/files')
-rw-r--r-- | mail/p5-Mail-SpamAssassin/files/patch-ImageInfo.pm | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/mail/p5-Mail-SpamAssassin/files/patch-ImageInfo.pm b/mail/p5-Mail-SpamAssassin/files/patch-ImageInfo.pm deleted file mode 100644 index 482a3c0b001d..000000000000 --- a/mail/p5-Mail-SpamAssassin/files/patch-ImageInfo.pm +++ /dev/null @@ -1,56 +0,0 @@ ---- lib/Mail/SpamAssassin/Plugin/ImageInfo.pm.orig 2007-08-08 05:19:14.000000000 -0800 -+++ lib/Mail/SpamAssassin/Plugin/ImageInfo.pm 2007-08-11 12:20:22.000000000 -0800 -@@ -49,6 +49,11 @@ - # body LARGE_IMAGE_AREA eval:pixel_coverage('all',150000) - # body SMALL_GIF_AREA eval:pixel_coverage('gif',1,40000) - # -+# image_name_regex() examples -+# -+# body CG_DOUBLEDOT_GIF eval:image_name_regex('/^\w{2,9}\.\.gif$/i') # catches double dot gifs abcd..gif -+# -+# - # See the ruleset for ways to meta image_count() - # and pixel_coverage() together. - # -@@ -80,6 +85,7 @@ - $self->register_eval_rule ("image_size_exact"); - $self->register_eval_rule ("image_size_range"); - $self->register_eval_rule ("image_named"); -+ $self->register_eval_rule ("image_name_regex"); - $self->register_eval_rule ("image_to_text_ratio"); - - return $self; -@@ -275,6 +281,33 @@ - } - - # ----------------------------------------- -+sub image_name_regex { -+ my ($self,$pms,$body,$re) = @_; -+ return unless (defined $re); -+ -+ # make sure we have image data read in. -+ if (!exists $pms->{'imageinfo'}) { -+ $self->_get_images($pms); -+ } -+ -+ return 0 unless (exists $pms->{'imageinfo'}->{"names_all"}); -+ -+ my $hit = 0; -+ foreach my $name (keys %{$pms->{'imageinfo'}->{"names_all"}}) { -+ dbg("imageinfo: checking image named $name against regex $re"); -+ my $eval = 'if (q{'.$name.'} =~ ' . $re . ') { $hit = 1; } '; -+ eval $eval; -+ dbg("imageinfo: error in regex $re - $@") if $@; -+ if ($hit) { -+ dbg("imageinfo: image_name_regex hit on $name"); -+ return 1; -+ } -+ } -+ return 0; -+ -+ } -+ -+# ----------------------------------------- - - sub image_to_text_ratio { - my ($self,$pms,$body,$type,$min,$max) = @_; |