root/tags/FuzzyOcr-2.3b/FuzzyOcr.cf

Revision 3, 5.3 kB (checked in by decoder, 2 years ago)

Added current stable and testing release
Added samples
Added patches to external toolchain

Line 
1 loadplugin FuzzyOcr FuzzyOcr.pm
2 body FUZZY_OCR eval:fuzzyocr_check()
3 describe FUZZY_OCR Mail contains an image with common spam text inside
4 body FUZZY_OCR_WRONG_CTYPE eval:dummy_check()
5 describe FUZZY_OCR_WRONG_CTYPE Mail contains an image with wrong content-type set
6 body FUZZY_OCR_CORRUPT_IMG eval:dummy_check()
7 describe FUZZY_OCR_CORRUPT_IMG Mail contains a corrupted image
8 body FUZZY_OCR_KNOWN_HASH eval:dummy_check()
9 describe FUZZY_OCR_KNOWN_HASH Mail contains an image with known hash
10
11 priority FUZZY_OCR             900
12
13 ########### Plugin Configuration #############
14
15 #### Logging options #####
16 # Verbosity level (see manual) Attention: Don't set to 0, but to 0.0 for quiet operation. (Default value: 1)
17 #focr_verbose 1
18 #
19 # Logfile (make sure it is writable by the plugin) (Default value: /etc/mail/spamassassin/FuzzyOcr.log)
20 focr_logfile /etc/mail/spamassassin/FuzzyOcr.log
21 ##########################
22
23 ##### Wordlists #####
24 # Here we defined the words to scan for (Default value: /etc/mail/spamassassin/FuzzyOcr.words)
25 focr_global_wordlist /etc/mail/spamassassin/FuzzyOcr.words
26 #
27 # This is the path RELATIVE to the respektive home directory for the personalized list
28 # This list is merged with the global word list on execution (Default value: .spamassassin/fuzzyocr.words)
29 #focr_personal_wordlist .spamassassin/fuzzyocr.words
30 #####################
31
32 # Set this to 1 if you are running a version < 3.1.4.
33 # This will disable a function used in conjunction with animated gifs that isn't available in earlier versions (Default value: 0.0)
34 #focr_pre314 0.0
35
36 # These parameters can be used to change other detection settings
37 # If you leave these commented out, the defaults will be used.
38 # Do not use " " around any parameters!
39 #
40 ##### Location of helper applications (path + binary) (Default values: /usr/bin/<app>) #####
41 #focr_bin_giffix /usr/bin/giffix
42 #focr_bin_giftext /usr/bin/giftext
43 #focr_bin_gifasm /usr/bin/gifasm
44 #focr_bin_gifinter /usr/bin/gifinter
45 #focr_bin_giftopnm /usr/bin/giftopnm
46 #focr_bin_jpegtopnm /usr/bin/jpegtopnm
47 #focr_bin_pngtopnm /usr/bin/pngtopnm
48 #focr_bin_ppmhist /usr/bin/ppmhist
49 #focr_bin_convert /usr/bin/convert
50 #focr_bin_identify /usr/bin/identify
51 #focr_bin_gocr /usr/bin/gocr
52 ############################################################################################
53
54 ##### Scansets, comma seperated (Default value: $gocr -i -, $gocr -l 180 -d 2 -i -) #####
55 # Each scanset consists of one or more commands which make text out of pnm input.
56 # Each scanset is run seperately on the PNM data, results are combined in scoring.
57 #focr_scansets $gocr -i -, $gocr -l 180 -d 2 -i -
58 #
59 # To use only one scan with default values, uncomment the next line instead
60 #focr_scansets $gocr -i -
61 #
62 # Some example for more advanced sets
63 # Thisone uses the first the standard scan, then a scanset which first reduces the image to 3 colors and then scans it with custom settings
64 # and then it scans again only with these custom settings
65 # NOTE: This is for advanced users only, if you have questions how to use this, ask on the ML or on IRC
66 #focr_scansets $gocr -i -, pnmnorm 2>$errfile | pnmquant 3 2>>$errfile | pnmnorm 2>>$errfile | $gocr -l 180 -d 2 -i -, $gocr -l 180 -d 2 -i -
67 #########################################################################################
68
69 ##### Various Score/Scan settings #####
70 # Timeout for the plugin, in seconds. (Maximum runtime of the plugin) (Default value: 10)
71 #focr_timeout 10
72 #
73 # Default detection treshold (see manual) (Default value: 0.3) (Can be changed on a per word basis in the wordlist).
74 #focr_threshold 0.3
75 #
76 # This is the score for a hit after focr_counts_required matches
77 #focr_base_score 4
78 #
79 # This is the additional score for every additional match after focr_counts_required matches (Default value: 1)
80 #focr_add_score 1
81 #
82 # This is the score to give for a wrong content-type (e.g. JPEG image but content type says GIF) (Default value: 1.5)
83 #focr_wrongctype_score 1.5
84 #
85 # This is the score to give for a corrupted image (This currently affects only GIF images) (Default value: 2.5)
86 #focr_corrupt_score 2.5
87 #
88 # This is the score to give for a corrupted unfixable image (This currently affects only GIF images) (Default value: 5)
89 #focr_corrupt_unfixable_score 5
90 #
91 # This is used to disable the OCR engine if the message has already more points than this value (Default value: 10)
92 #focr_autodisable_score 10
93 #
94 # Number of minimum matches before the rule scores (Default value: 2)
95 #focr_counts_required 2
96 #
97 # Specifies, how many frames an animated gif must contain, so the second (less resource consuming) animated gif test is used. (Default value: 5)
98 #focr_gif_max_frames 5
99
100 #######################################
101
102 ##### Image Hash Database settings (Experimental, disabled by default) #####
103 #
104 # Set this to 1 to enable the Image Hash database feature (Default value: 0.0)
105 #focr_enable_image_hashing 0.0
106 #
107 # The score is saved with the hash in the database, so no extra scoring for a db hit is required.
108 #
109 # If the image hash database feature is enabled, specify the file here to use as database (Default value: /etc/mail/spamassassin/FuzzyOcr.hashdb)
110 #focr_digest_db /etc/mail/spamassassin/FuzzyOcr.hashdb
111 #
112 # Automatically add hashes of spam images recognized by OCR to the Image Hash database, to disable, set to 0.0 (Default value: 1)
113 #focr_hashing_learn_scanned 1
114 #
115 ######################################################################
Note: See TracBrowser for help on using the browser.