Adam Katz a écrit :
> Refined to include the ifplugin directive (which if you prefer can go
> after the three mimeheader lines).
> 
> ifplugin Mail::SpamAssassin::Plugin::ImageInfo
> mimeheader __MIME_GIF    Content-Type =~ /image\/gif/i
> mimeheader __MIME_PNG    Content-Type =~ /image\/png/i
> mimeheader __MIME_JPEG   Content-Type =~ /image\/jpe?g/i
> body __GIF_ATTACH        eval:image_count('gif',1)
> body __PNG_ATTACH        eval:image_count('png',1)
> body __JPEG_ATTACH       eval:image_count('jpeg',1)
> 
> meta IMAGE_MISMATCH      (__MIME_GIF && !__GIF_ATTACH) || (__MIME_PNG &&
> !__PNG_ATTACH) || (__MIME_JPEG && !__JPEG_ATTACH)
> describe IMAGE_MISMATCH  Contains wrong image format for MIME header
> score IMAGE_MISMATCH     1.0
> endif

is there a way to generalize this to other MIME types? I mean a file
claiming to be a .pdf when it is a .wmv...?

or do we need a FileType plugin?

Reply via email to