FuzzyOcr on Debian sarge
This article covers the installation of FuzzyOcr on Debian sarge including update to packages from backports.org. For informations how to install packages from bpo see here!
Update spamassassin:
# aptitude -t sarge-backports install spamassassin
Keep in mind, that there are essential changes in configuration, so you need to check it to match your needs!
Install other required packages:
# aptitude -t sarge-backports install gocr libungif-bin \
libimage-exif-perl libimage-exiftool-perl libstring-approx-perl \
imagemagick netpbm
Install and patch FuzzyOrc:
# cd /usr/local/src/
# wget \
http://users.own-hero.net/~decoder/fuzzyocr/fuzzyocr-2.3b.tar.gz
# tar xzvf fuzzyocr-2.3b.tar.gz
# wget \
http://www200.pair.com/mecham/spam/fuzzyocr-23b-hashdb-poison.patch
# cd FuzzyOcr-2.3b
# patch FuzzyOcr.pm < ../fuzzyocr-23b-hashdb-poison.patch
# cp FuzzyOcr.pm /usr/share/perl5/Mail/SpamAssassin/Plugin/
# cp FuzzyOcr.cf /etc/spamassassin/
# cp FuzzyOcr.words.sample /etc/spamassassin/FuzzyOcr.words
Configure FuzzyOcr:
# echo "loadplugin FuzzyOcr /usr/share/perl5/Mail/SpamAssassin/Plugin/FuzzyOcr.pm" \
>> /etc/spamassassin/v310.pre
# sed -i \
"s/^loadplugin\ FuzzyOcr\ FuzzyOcr.pm/#loadplugin\ FuzzyOcr\ FuzzyOcr.pm/" \
/etc/spamassassin/FuzzyOcr.cf
# sed -i \
"s/^#focr_base_score\ 4/focr_base_score\ 2/" \
/etc/spamassassin/FuzzyOcr.cf
# sed -i \
"s/^focr_logfile\ \/etc\/mail\/spamassassin/focr_logfile\ \/var\/log" \
/etc/spamassassin/FuzzyOcr.cf
For SpamAssassin less than 3.1.4:
# sed -i "s/^focr_pre314\ 0.0/focr_pre314\ 1.0/" \
/etc/spamassassin/FuzzyOcr.cf
Create Logfile:
# touch /var/log/FuzzyOcr.log
# chown nobody:nogroup /var/log/FuzzyOcr.log
# chmod 600 /var/log/FuzzyOcr.log
Verify Spamassassin config:
# spamassassin --lint