Spam inside images
Erik van der Leun
evanderleun at hal9000.nl
Tue Nov 21 15:12:23 GMT 2006
Gerhard Mourani wrote:
> Hello list,
>
> I would like to know if someone know how to make MailScanner scan inside
> images for spam. I receive lot of this kind of new spam now. There are
> inside the image and cannot be detected by spamassasin which check for
> texts only.
>
> Gerhard,
>
>
1. cd to /etc/mail/spamassassin
2. download the patch file from:
http://antispam.imp.ch/patches/patch-ocrtext
3. type 'patch < patch-ocrtext'
This will create two files in your current directory called
ocrtext.cf and ocrtext.pm
4. Edit v310.pre and add the following lines:
# OCR - performs Optical Character Recognition on spam images
#
loadplugin ocrtext /etc/mail/spamassassin/ocrtext.pm
loadplugin Mail::SpamAssassin::Timeout
5. Edit the ocrtext.cr file and change the following settings:
## This points to your gocr binary not just the path. Try 'which gocr'.
gocr_path /usr/local/bin/gocr
## This is JUST the path to your pnm binarys ( i.e. pngtopnm, giftopnm,
jpegtopnm )
pnmtools_path /usr/bin
6. Run spamassassin -D --lint and check for errors.
If all went well restart spamassassin or force it to reread it's config
however you would on your system.
Then try typing something like 'tail -f /var/log/mail.log | grep
SPAMPIC_ALPHA', on a high volume server you should see some rules
matching after a few minutes. If so then you are OCR'ing the images!
More information about the MailScanner
mailing list