Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Added scoring for wrong content-type
  • Added scoring for broken gif images
  • Added configuration for helper applications
  • Added autodisable_score feature to disable the OCR engine if the message has already enough points

Version 2.2

  • Several bugfixes
  • New debug system
  • Logfile support
  • Proper error handling for most errors

Installation

Download the tarball (see How to Obtain) to your spamassassin configuration directory and unpack it to /etc/mail/spamassassin/ (You may choose another location but all necessary adjustments to the configuration file are up to you then). Open FuzzyOcr.cf and extend the wordlist as you wish. If you have the helper binaries in a different location than the default in the config file specifies, then change these to the correct path.

The scoring is dynamic, more word matches lead to a higher score. The scoring is done as soon as focr_counts_required matches were found. It scores exactly focr_base_score points then. For every additional match, it scores additionally focr_add_score points.

...

focr_tmp_path - String determining the absolute path to a directory where the plugin may write temporary files to (without trailing slash)

focr_logfile - String determining the file to send log messages to. Make sure this is writable!

focr_verbose - Verbose level (0 - 2). (1 is currently the default)

...

  • 2 means same as 1 with an additional output of the text recognized by gocr in a file debug.<number>.focr in the local directory
    This file also contains the recognized format type in the first line (1 means gif, 2 jpeg, 3 png). to the logfile (more messages) and temporary files don't get deleted (so you can inspect them)

focr_bin_* - Tells the plugin about the helper applications, change to the full path + binary name if your applications are not found.

...