Installing FuzzyOcr on FreeBSD with MailScanner

 

 

        - Install gocr from ports

        - Install libungif from ports

        - Install p5-String-Approx from ports

        - Install netpbm from ports if not all ready installed as dependency

        - Install ImageMagick from ports

        - Install GraphicsMagick from ports if not all ready installed

        - fetch http://users.own-hero.net/~decoder/fuzzyocr/fuzzyocr-latest.tar.gz

        - tar xzf fuzzyocr-latest.tar.gz

        - cd Fuzzy*

        - mv FuzzyOcr.cf FuzzyOcr.pm /usr/local/etc/mail/spamassassin

        - mv FuzzyOcr.words.sample /usr/local/etc/mail/spamassassin/FuzzyOcr.words

        - edit  /usr/local/etc/mail/spamassassin/FuzzyOcr.cf and change

                - focr_logfile /var/log/FuzzyOcr.log

                - focr_global_wordlist /usr/local/etc/mail/spamassassin/FuzzyOcr.words

                - uncomment helper applications and change paths to /usr/local/bin/*

                                    focr_bin_giffix /usr/local/bin/giffix

                                    .

                                    .

                                    focr_bin_gocr /usr/local/bin/gocr

 

        - touch /var/log/FuzzyOcr.log and chgrp it to spamd, chmod it to 664.

        - run "spamassassin -x -D --lint" to check the results

                - Check for lines like:

                        [69628] dbg: plugin: fixed relative path: /usr/local/etc/mail/spamassassin/FuzzyOcr.pm

                        [69628] dbg: plugin: loading FuzzyOcr from /usr/local/etc/mail/spamassassin/FuzzyOcr.pm

                        [69628] dbg: plugin: registered FuzzyOcr=HASH(0x958d1a8)

                        [69628] dbg: plugin: FuzzyOcr=HASH(0x958d1a8) implements 'parse_config'

 

 

        - restart mailscanner with "/usr/local/etc/rc.d/mailscanner stop" wait 10 seconds then "/usr/local/etc/rc.d/mailscanner start"

 

 

 

  Then check spam score on messages, should show something like:FUZZY_OCR 6.00 (assuming there was a image with spam in the email).