There could be various reasons ranging from "plugin isn't loaded"
(though you'd get an error w/ the rules then) to "image isn't exactly
that size", to "plugin can't determine width+height from image", to
...

Assuming the plugin is loaded ("spamassassin -D plugin --lint" would
tell you), and you've verified that the size is what you think it is
using some method ...   For option 3, run the message through
"spamassassin -D imageinfo" and see what it spits out.  If you don't
see something like:

imageinfo: png image FOO.PNG is 400 x 240 pixels (96000 pixels sq.)

Then it didn't figure out the height + width.  If it does output that,
compare the height and width to what you expected.


On Thu, Apr 30, 2009 at 1:57 PM, aixenv <[email protected]> wrote:
>
> I notice there's a:
>
> mx1:/usr/share/perl5/Mail/SpamAssassin/Plugin# ls -lah ImageInfo.pm
> -rw-r--r-- 1 root root 11K Aug  8  2007 ImageInfo.pm
>
> and within that there's two subs 'image_named' and 'image_size_exact'
>
> mx1:/usr/share/perl5/Mail/SpamAssassin/Plugin# cat ImageInfo.pm |grep
> image_named
>  $self->register_eval_rule ("image_named");
> sub image_named {
> mx1:/usr/share/perl5/Mail/SpamAssassin/Plugin# cat ImageInfo.pm |grep exact
>  $self->register_eval_rule ("image_size_exact");
> sub image_size_exact {
> mx1:/usr/share/perl5/Mail/SpamAssassin/Plugin#
>
> I am trying the following rule and it is not scoring, what am i missing?:
>
> (this rule is in my local.cf)
>
> # rule to block annoying viagra spam with scraped text based off image size,
> # name and having other rule hits
> # 4/30/09 8:45AM
> body __ZL_PNG_400_240 eval:image_size_exact('png',400,240)
> body __ZL_CAM eval:image_named('/^DS[CL]\d{4}\.png$/')
> meta ZL_VIAGRAIMG HTML_MESSAGE && __ZL_CAM && __ZL_PNG_400_240
> describe ZL_VIAGRAIMG Includes 400x240 viagra png image
> score ZL_VIAGRAIMG 1.00
>
> any help is appreciate thanks
>
> aixenv
>
> --
> View this message in context: 
> http://www.nabble.com/trying-to-score-based-on-image-name-and-image-size-tp23321365p23321365.html
> Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
>
>

Reply via email to