INSTALLATION
============

1) Requirements
***************
facileOCR was tested on Linux.
it requires convert and identify (ImageMagick) and ocrad.
And of course spamassassin ;)

Unpack downloaded facileOCR[version]tar.gz somewhere and copy 
facileOCR.cf and facileOCR.pm
to /etc/mail/spamassassin/.

Open facileOCR.cf and adapt wordlist, debuglog or ocr_profile settings, 
if needed.

*** A little extra goody: mime_png_only.cf
The rule gives an extra point for all mails, that just contain 
one single png and no text at all.
If you want to use it, copy it to /etc/mail/spamassassin/.

2) Test
*******
Always recommended:

 spamassassin --lint

then get some spammails and call spamassassin in debug mode:

 spamassassin -D facileOCR < spamtestmail.eml

If it doesn't give the expected score, turn on debuglog and check 
in logfile /tmp/sa_OCR.log what's going on.
If no text was extraced, although there are images attached to the testmail,
and image filesize ist between 6kB and max_img_size,
images contain text, filetype ist GIF, PNG, or JPEG,
and - if animated GIF - image has less than 9 layers,
try a different ocr_profile:

1 - default, should fit best for dark font on light background
2 - fits best for light font on dark background
3 - for stronger obfuscated text with less contrast

The words after "imgTextOcr contains:"
are the ones extracted by ocrad.
You can copy spamwords from debuglog to facileOCR.cf.

If none of the builtin profiles works for you, contact me:
kalex77 [at] hotmail.com

3) Activate
***********
If tests are OK, REMOVE /tmp/sa_OCR.log and reload spamd or amavis.
Most likely your spamservice is running as an unprivileged user,
removing (root's) logfile avoids problems with permissions on that file.

See also: http://spielwiese.la-evento.com/facileOCR/ section Troubleshooting

Dont't forget to reload spamd or amavis, whenever you changed
something in facileOCR.cf.
