How it works
This plugin checks for specific keywords in image/gif attachments, using
gocr (an optical character recognition program).
This plugin can be used to detect spam that puts all the real spam content in an attached image. The mail itself only random text and random html, without any URL's or identifiable information.
You will need
convert (imagemagick) and
Save the two files below in your local configuration directory, adjusting the score in
Ocr.cf as you like, and the wordlist (
my @words =) in
Ocr.pm according to the spam you are receiving. You might want to run
by hand on the image attachments to look for words that are correctly recognized.
- Note that this is my first SA plugin, so any feedback is welcome
- The words checked for are specific for some spam I received a lot of recently.
gocrcan take up quite a bit of resources, so be careful. But it is only executed for messages that contain gif attachments.
- Words are hardcoded. Should be a configuration parameter instead.
- Instead of checking for specific words, it might be better to "check if the image contains a certain amount of text", since it is not very likely that people send legitimate mail with text in images.
– Author: Maarten de Boer, mdeboer at iua dot upf dot edu
giftopnm, because I received some mails with .gif's that were actually .jpg's.
converthandles that ok.
- Some words added