FreeBSD FuzzyOCR SA Plugin for FreeBSD

Required ports to install are netpbm, gocr, imagemagick, giflib and the String::Approx Perl module.

# mkdir /var/log/qmail/fuzzyocr/
# cd /usr/ports/graphics/netpbm && make install clean
# cd /usr/ports/graphics/gocr && make install clean
# cd /usr/ports/graphics/ImageMagick && make install clean
# cd /usr/ports/devel/p5-String-Approx && make install clean
# cd /usr/local/etc/mail/spamassassin
# fetch
# tar zxvf fuzzyocr-latest.tar.gz
# cd FuzzyOcr-version

edit and change all "/etc/mail/spamassassin/" to "/usr/local/etc/mail/spamassassin/"

Set the focr_logfile to /var/log/qmail/fuzzyocr/FuzzyOcr.log

In the file you will need to change the paths of the "Helper Applications" located around line 41. Change them to the following unless you installed them to /usr/bin/.

focr_bin_giffix /usr/local/bin/giffix
focr_bin_giftext /usr/local/bin/giftext
focr_bin_gifasm /usr/local/bin/gifasm
focr_bin_gifinter /usr/local/bin/gifinter
focr_bin_giftopnm /usr/local/bin/giftopnm
focr_bin_jpegtopnm /usr/local/bin/jpegtopnm
focr_bin_pngtopnm /usr/local/bin/pngtopnm
focr_bin_ppmhist /usr/local/bin/ppmhist
focr_bin_convert /usr/local/bin/convert
focr_bin_identify /usr/local/bin/identify
focr_bin_gocr /usr/local/bin/gocr

Be sure they are all uncommented.

# cp FuzzyOcr.* /usr/local/etc/mail/spamassassin/
# cd /usr/local/etc/mail/spamassassin/
# mv FuzzyOcr.words.sample FuzzyOcr.words
# svc -t /service/spamd

If you are using my cfupdates script, you should remove the rm *.* or otherwise your Fuzzy confs will go bye bye