FuzzyOCR is a tool that detects spam inside of images. This tool works wonderfully and I would highly recommend using it. You can find out more by visiting the FuzzyOCR web site at http://fuzzyocr.own-hero.net/.

Note: This is optional at this time as FuzzyOcr has been unmaintained for a very long time. This may or may not work. I’m currently looking into a fix, workaround or alternative. In this case, ImageMagick may work. So, that’s what we’re going with here.

Install ImageMagick, Tesseract and FuzzyOcr:

(This is quite a large build and will likely take a while...)
# portmaster -dG --no-confirm graphics/ImageMagick7-nox11 graphics/tesseract mail/p5-FuzzyOcr-devel

Create script to replace “gifinter” with ImageMagick’s “convert” and make it executable:

# echo "/usr/local/bin/convert -interlace" > /usr/local/bin/gifinter
# chmod +x /usr/local/bin/gifinter

Copy FuzzyOcr files to SpamAssassin configuration directory:

# cp /usr/local/share/examples/FuzzyOcr/FuzzyOcr.* /usr/local/etc/mail/spamassassin

Edit /usr/local/etc/mail/spamassassin/FuzzyOcr.cf file using “sed” to rid ourselves of the double “/usr/local” entries:

# sed -i.bak 's|\/usr\/local\/usr\/local|\/usr\/local|g' /usr/local/etc/mail/spamassassin/FuzzyOcr.cf
# rm -f /usr/local/etc/mail/spamassassin/FuzzyOcr.cf.bak

Page 8 or back to Page 6