Once You Know, You Newegg
Home FAQ SpamAssassin FuzzyOCR Walkthrough
FuzzyOCR Walkthrough PDF Print E-mail
Written by Bill Olson   
Sunday, 12 April 2009 01:48

FreeBSD FuzzyOCR SA Plugin for FreeBSD

Required packages are netpbm, gocr, imagemagick, giflib and the String::Approx Perl module.

# pkg_add -r netpbm
# pkg_add -r gocr
# pjg_add -r libungif
# pkg_add -r ImageMagick
# cd /usr/ports/devel/p5-String-Approx
# make install clean
# cd /usr/local/etc/mail/spamassassin
# fetch http://users.own-hero.net/~decoder/fuzzyocr/fuzzyocr-latest.tar.gz
# tar zxvf fuzzyocr-latest.tar.gz
# cd FuzzyOcr-version

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

I set my focr_logfile to /var/log/FuzzyOcr.log

also edit the FuzzyOcr.pm file.  Search for "$logfile", and you will notice a line calling the log file again.  I just pointed it to the same location.  Not sure why it's called twice.

Now we finish up.

also in the FuzzyOcr.cf 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
# /usr/local/etc/rc.d/sa-spamd.sh restart

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

#* Writen By mintee 10/17/2007 *

Last Updated on Sunday, 31 May 2009 21:59