| 1 |
Requirements: |
|---|
| 2 |
|
|---|
| 3 |
SpamAssassin 3.1.4 or higher |
|---|
| 4 |
|
|---|
| 5 |
libungif: |
|---|
| 6 |
http://sourceforge.net/project/showfiles.php?group_id=102202 |
|---|
| 7 |
|
|---|
| 8 |
netpbm: |
|---|
| 9 |
http://sourceforge.net/project/showfiles.php?group_id=5128 |
|---|
| 10 |
|
|---|
| 11 |
gifsicle: |
|---|
| 12 |
http://www.lcdf.org/gifsicle/gifsicle-1.44.tar.gz (latest) |
|---|
| 13 |
|
|---|
| 14 |
gocr: (v0.40) suggested ... needs to be patched! |
|---|
| 15 |
http://sourceforge.net/project/showfiles.php?group_id=7147 |
|---|
| 16 |
|
|---|
| 17 |
ocrad (optional): |
|---|
| 18 |
Please use your closest GNU mirror: |
|---|
| 19 |
http://www.gnu.org/prep/ftp.html |
|---|
| 20 |
|
|---|
| 21 |
Several perl modules: |
|---|
| 22 |
String::Approx |
|---|
| 23 |
MLDBM |
|---|
| 24 |
|
|---|
| 25 |
Make sure all the above requirements are met, or else!!! |
|---|
| 26 |
I personally think it is better to compile all from source, but |
|---|
| 27 |
binary packages are available if you decide to go that way. The |
|---|
| 28 |
only package that should be compiled from source is gocr (since |
|---|
| 29 |
it requires some patching to make it work better ;) |
|---|
| 30 |
|
|---|
| 31 |
Place a copy of the following files in your SpamAssassin local |
|---|
| 32 |
configuration directory (/etc/mail/spamassassin by default): |
|---|
| 33 |
|
|---|
| 34 |
FuzzyOcr.pm |
|---|
| 35 |
FuzzyOcr.cf (change to taste) |
|---|
| 36 |
FuzzyOcr.words |
|---|
| 37 |
|
|---|
| 38 |
If using image-hasing option (disabled by default but recommended) you need to specify |
|---|
| 39 |
the following options in FuzzyOcr.cf: |
|---|
| 40 |
|
|---|
| 41 |
focr_enable_image_hashing 1 |
|---|
| 42 |
focr_digest_db <full_path_to_file> |
|---|
| 43 |
|
|---|
| 44 |
or (recommended) |
|---|
| 45 |
|
|---|
| 46 |
focr_enable_image_hashing 2 |
|---|
| 47 |
focr_db_hash <full_path_to_file> |
|---|
| 48 |
focr_db_safe <full_path_to_file> |
|---|
| 49 |
focr_db_max_days ## |
|---|
| 50 |
|
|---|
| 51 |
In either case, you need to make sure the effective user running |
|---|
| 52 |
SpamAssassin has the proper permissions to write to the specified files, |
|---|
| 53 |
or change permissions on the files so that the effective user has |
|---|
| 54 |
write permissions on these files. |
|---|
| 55 |
|
|---|
| 56 |
Test with: |
|---|
| 57 |
|
|---|
| 58 |
spamassassin --debug FuzzyOcr < path_to_email > /dev/null |
|---|
| 59 |
|
|---|
| 60 |
If you do not get errors, you are ready to go, and restart SPAMD which is |
|---|
| 61 |
the (*strongly*) recommended way to use this plugin. |
|---|
| 62 |
|
|---|