All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 # mailfilter.cf -- Config file for mailfilter, mailreaver, mailtrainer
3 # You MUST edit the fileds for "Secret Password", "mime decoder", and
4 # "cache_dupe_command". Just those THREE things.
6 # Changes to all other values are optional.
8 # Many of the options here have two or three alternatives; for your
9 # convenience, we have put all of the reasonable alternatives
10 # on sequential lines. Uncomment the one you want, and leave the
11 # others commented out. If you leave more than one uncommented, the
12 # last one is the one that's used. Don't do that; it's ugly.
14 # After you edit this file, don't forget to edit 'rewrites.mfp'
16 # --------->>> You MUST set the following correctly! <<<-------
18 # If you leave it as "DEFAULT-PASSWORD", you will not be able to
19 # access the mail-to-myself commanding system, as "DEFAULT-PASSWORD"
20 # is specifically _disabled_ as a legal password. Just pick something, eh?
22 :spw: /DEFAULT_PASSWORD/
24 # ----- If you want a verbose startup, turn this on. Note that this is
25 # ----- intentionally _after_ the password is set, so a verbose startup
26 # ----- will not reveal your password.
28 #:verbose_startup: /SET/
32 # --------->>> You MUST set the following correctly! <<<-------
34 # --- Some mail systems do mime decoding with "mimencode -d" or "-u".
35 # --- Others (such as Red Hat 8.0) use "mewdecode" .
36 # --- Yet others (such as Fedora Core 3) use "openssl base64 -d" .
37 # --- Yet Others (i.e. *BSDs) can use "base64" .
38 # --- See which one is on your system and use that one- comment
39 # --- the others out. If you can't figure out what your base64 mime
40 # --- decoder is, or don't want mime decoding, set :do_base64: to /no/
41 # --- but expect a significant accuracy decrease if you do this.
46 #:mime_decoder: /mewdecode/
47 #:mime_decoder: /mimencode -d/
48 #:mime_decoder: /mimencode -u/
49 #:mime_decoder: /base64 -d/
50 :mime_decoder: /openssl base64 -d/
51 #:mime_decoder: /normalizemime/
54 # --------->>> You MUST set the following correctly! <<<-------
56 # --- Linux (and Unix) systems use "hardlinks" to make a file
57 # --- appear in more than one place, while not actually using up
58 # --- extra disk space. Sadly, it is the case that most
59 # --- Windows systems have no such feature. So, you must set the
60 # --- following for what kind of system you are actually using.
61 # -- Note to other developers: here's where to put other system-dependent
62 # -- syscall commands.
64 # --- Use the default /ln/ for LINUX and UNIX systems (does a hard-link,
65 # --- does not use up disk space or inodes). Change this to the /copy/
66 # --- command for WINDOWS systems (95, 98, NT, XP)
68 # --- Mild security issue: to avoid a theoretical exploit where a user
69 # --- gets their commands re-aliased, make sure you use the fully qualified
70 # --- commandname (that is, starting in the root directory).
72 :cache_dupe_command: /\/bin\/ln/
73 #:cache_dupe_command: /copy/
77 ###########################################################################
79 # END of things you absolutely MUST set. Feel free
80 # to keep reading though...
82 ###########################################################################
84 ###########################################################################
86 # START of things you might likely want to set. These
87 # are probably OK for you, but many users change these things.
89 ##########################################################################
91 # ----------- define an optional target for where to send spam,
92 # ----------- To NOT forward this to another account, just leave the
93 # ----------- address as the empty string, which is '//'.
94 # ----------- This works fine especially if your mail reader program
95 # ----------- can sort based on the ADV and UNS (or whatever you choose
96 # ----------- to use as flagging strings) in the "Subject:" field.
97 # ------- CAUTION- some systems are buggy and _REQUIRE_ a user@host.domain
98 # ----- in the following to forward spammy mail correctly. WTF??? :-(
100 #:general_fails_to: /somebody@somewhere.net/
101 :general_fails_to: //
104 # -------- If you would prefer to send specific kinds of spam to
105 # -------- different mailboxes, here's where to do it.
106 # ----------(be sure to uncomment the line!)
108 # :fail_priority_mail_to: /where_priority_fails_go/
109 # :fail_blacklist_mail_to: /where_blacklist_fails_go/
110 # :fail_SSM_mail_to: /where_Classifier_fails_go_for_mailFILTER/
111 # :fail_classify_mail_to: /where_classifier_fails_go_for_mailREAVER/
114 # --------- Do we give nonspam, spam, and unsure an exitcode of 0
115 # --------- (for most standalone apps) or something else?
116 # --------- Usually we use an exit code of 1 for "program fault",
117 # --------- but change it if you need to use 0/1 for good/spam
118 # --------- Don't use an exit code greater than 128 (it breaks BASH!)
119 # --------- If you use exit codes (procmail doesn't) change it here.
120 :rejected_mail_exit_code: /0/
121 :accepted_mail_exit_code: /0/
122 :unsure_mail_exit_code: /0/
123 :program_fault_exit_code: /1/
125 #######################################################################
127 # END of things you are likely to want to change.
129 # Anything following is starting to approach true customization.
130 # Feel free to explore and poke around.
131 ######################################################################
133 # -----------Do we want to add the optional headers to the mail?
134 # -----------If turned on, will add X-CRM114-Whatever: headers on each
135 # -----------incoming email. (note- this does NOT turn off the cache-id header
141 # --------- do we add the statistics report?
142 :add_verbose_stats: /no/
143 #:add_verbose_stats: /no/
146 # --------- do we add the mailtrainer report to the top of the message body
147 # --------- after training?
148 :add_mailtrainer_report: /no/
149 #:add_mailtrainer_report: /no/
152 # --------- Do we enable long-form explains (with lots of text)?
153 # -- you can have no extra stuff, add it as text, or add it as an attachment.
154 # -- (only available in mailfilter, not mailreaver)
156 :add_extra_stuff: /no/
157 # :add_extra_stuff: /text/
158 # :add_extra_stuff: /attachment/
161 # --------- Do we want to insert a "flagging" string on the subject line,
162 # --------- perhaps to insert an 'ADV:' ? Whatever string we put here
163 # --------- will be inserted at the front of the subject if we think the
164 # --------- mail is spam.
166 # :spam_flag_subject_string: //
167 :spam_flag_subject_string: //
169 # --------- Do we want to insert a "flagging" string on the subject line
170 # --------- for good email? Usually we don't.... so we set this to the
171 # --------- null string - that is, //
172 :good_flag_subject_string: //
174 # ------------Similarly, do we want to insert a "flagging" string on
175 # -------------the subject line of an "unsure" email? This way we know
176 # --------------we need to train it even if "headers" is turned off.
177 # :unsure_flag_subject_string: //
178 :unsure_flag_subject_string: //
180 # ------------- Do we want Training ConFirmation flags on the results of
181 # ------------- a message to be learned? Default is "TCF:".
182 :confirm_flag_subject_string: //
183 #:confirm_flag_subject_string: //
186 # --------- Do we want to do any "rewrites" to increase generality and
187 # ---------- (usually) accuracy? IF 'yes', be sure to edit rewrites.mfp!
188 # --------- NOTE: this option is somewhat slow. If your mailserver is
189 # --------- maxed out on CPU, you might want to turn this off.
191 :rewrites_enabled: /yes/
192 #:rewrites_enabled: /no/
195 # --------- Do we copy incoming text into allmail.txt ? default is yes, but
196 # --------- experienced users will probably set this to 'no' after testing
197 # --------- their configuration for functionality.
199 :log_to_allmail.txt: /no/
200 # :log_to_allmail.txt: /no/
202 # ------- Another logging option - log all mail to somewhere else
203 # ------- entirely. Whatever pathname is given here will be prefixed
204 # ------- by :fileprefix:
205 # ------- To not use this, set it to the null string .. //
206 # ------- Remember to backslash-escape path slashes!
207 :log_all_mail_to_file: //
208 #:log_all_mail_to_file: /my_personal_mail_log_file_name.txt/
211 # ---------- Message Cacheing for retraining - do we keep a cache of
212 # ---------- messages we've classified recently "in the wild" as retrain
213 # ---------- texts? This uses up some disk space, but means that we can
214 # ---------- use mailtrainer.crm on these messages to autotune the classifier.
215 # ---------- Default is to cache into the directory reaver_cache ;
216 # ---------- if you don't want this, set it to // . If you don't use this,
217 # ---------- you can't really use mailtrainer.crm, and you must keep your
218 # ---------- headers scrupulously clean in all train messages. Recommended
219 # ---------- to leave this unchanged unless you are VERY short of disk.
221 :text_cache: /../../../.var/crm114/reaver_cache/
225 # ----- How do we invoke the trainer (as in, just the invocation
226 # ------ of CRM114 on mailtrainer.crm. Usually this is just obvious,
227 # ------- but if you don't have CRM114 installed in the search path, here's
228 # -------- where you can set trainer invocation to be via whatever path
229 # --------- you want it (the second example is if you haven't installed
230 # ---------- CRM114 at all, but are running the crm114_tre static binary
231 # ----------- right out of the local directory.)
233 # -- use this next one if you have installed CRM114 with "make install"
234 # -- (This is preferred and is the default)
235 :trainer_invoke_command: /\/usr\/share\/crm114\/mailtrainer.crm/
237 # -- use this one if you can't do a "make install" and so must run the
238 # --- crm114_tre binary directly out of the current working directory.
239 # :trainer_invoke_command: /.\/crm114_tre mailtrainer.crm /
242 # ------ If we're cacheing for retraining, we're probably using
243 # ------ mailtrainer.crm or some other variant. In that case,
244 # ------ you will want a "randomizer" to present the training
245 # ------ examples to the classifier in some random but balanced order.
246 # ------ You have two choices - you can either use the "sort"
247 # ------ command on some random character in the filename (this
248 # ------ is NOT recommended) or use the "shuffle.crm" program.
249 # ------ We _strongly_ recommend using shuffle.crm; the default
250 # ------ options to shuffle.crm will work fine. Alternatively,
251 # ------ you can use the "sort --key 1.2" on date-named files to
252 # ----- achieve chronological training
253 :trainer_randomizer_command: / .\/shuffle.crm /
254 #:trainer_randomizer_command: / .\/crm114_tre shuffle.crm /
255 #:trainer_randomizer_command: /sort --key 1.2/
258 # --------- Do we log rejected mail to a file? default yes, but most
259 # --------- users should set this to no after testing their
260 # --------- configuration to verify that rejected mail goes to the
261 # --------- reject address. Only works in mailfilter.crm
263 :log_rejections: /yes/
264 #:log_rejections: /no/
266 # ------- alternate rejection logging - set this pathname to non-null
267 # ------ to log rejections elsewhere. Only for mailreaver.crm.
268 # ----- Set to NULL ( // ) to turn this off.
269 :log_rejections_to_file: //
270 #:log_rejections_to_file /this_is_my_rejected_email_log_file.txt/
273 # ----------Do we want to enable "inoculation by email"?
274 # --------(leave this off unless you want RFC inoculations)
276 :inoculations_enabled: /no/
277 #:inoculations_enabled: /yes/
280 # --------- How many characters of the input do we really trust to be
281 # ---------- worthy of classification? Usually the first few thousand
282 # ----------- bytes of the message tell more than enough (though we've
283 # ------------ been "noticed" by spammers, who are now packing 4K of
284 # ------------- innocuous text into their headers. No problemo... :) )
286 #:decision_length: /4096/
287 #:decision_length: /64000/
288 :decision_length: /16000/
289 # ----- for entropy users ONLY - 4K is plenty!
290 #:decision_length: /4096/
294 # ------------ Do we want to expand URLs (that is, fetching the contents
295 # ------------- of a URL and inserting that after the url itself?)
296 # -------------- By default this is off, but turn it on if you want
297 # --------------- to experiment.
299 # :expand_urls: /yes/
301 # WGET options - 30-second timeout, output to stdout.
302 # HACK - use the proper --user-agent="IEblahblah" for max effect!
303 :url_fetch_cmd: /wget -T 30 -O - /
304 # and trim the URL text to not more than 16bytes of text.
305 :url_trim_cmd: / head -c 16000 /
308 #######################################################################
310 # ------------------- YOU REALLY SHOULD STOP HERE -------------------
311 # --------- values below this line are usually OK for almost all
312 # --------- users to use unchanged - Gurus only beyond this point.
314 #######################################################################
316 # If you want to change things here, go ahead, but realize you are
317 # playing with things that can really hurt accuracy.
319 # This being open source, if you don't *think* about changing it,
320 # what would be the use of it being open source? That said, this
321 # _is_ open source- you break it, you get to keep _both_ pieces!
324 # ------------ CLF - The Classifier Flags ----------
326 # --------- Which classifier flags do we use? Default for 20060101 has
327 # --------- been changed to OSB UNIQUE MICROGROOM.
329 # --------- A null setting gets you straight Markovian, without
330 # --------- microgrooming. OSB uses less memory, is faster,
331 # --------- and is usually more accurate. Correlative matching is
332 # --------- 100x - 1000x slower, but can match anything (binaries,
333 # --------- wide chars, unicode, virii, _anything_. Winnow is a
334 # --------- non-statistical learning classificer with very nice
335 # --------- accuracy (up to 2x SBPH). Hyperspace is a pseudogaussian
336 # --------- KNN (K-nearest-neighbor) matcher.
338 # --------- This is also where we set whether to use microgrooming
339 # --------- or Arne optimization (they're currently mutually exclusive).
340 # --------- If you turn off microgrooming you get Arne optimization
341 # --------- automatically.
343 # --------- If you _change_ this, you _must_ empty out your .css or
344 # --------- .cow files and build fresh ones, because these
345 # --------- classifiers do NOT use compatible data storage formats!
349 #:clf: /osb microgroom/
350 :clf: /osb unique microgroom/
354 #:clf: /osbf microgroom/
356 #:clf: /hyperspace unique/
361 # --------- If you are using thick-threshold training of any sort,
362 # ---------- (for OSBF or otherwise) put the threshold here.
363 # ----------- Remember, the polarity of the thick threshold value
364 # ------------ is that anything scoring less than this value
365 # ------------- should be considered a trainable error, and it "flips over"
366 # -------------- so that both good mail and spam have the right symmetrical
367 # ---------------- polarity.
369 # ------ a very small thick threshold (or zero!) works for Markovian.
370 #:thick_threshold: /0/
371 #:thick_threshold: /.001/
372 # ----- a thick threshold of 5 to 20 seems good for OSB, OSBF,
373 # Hyperspace, Bit-Entropy, and Winnow
374 #:thick_threshold: /5.0/
375 :thick_threshold: /10.0/
376 #:thick_threshold: /20.0/
379 # ---- What regex do we use for LEARN/CLASSIFY? the first is the
380 # ---- "old standard". Other ones are handy for different spam
381 # ---- mixes. The last one is for people who get a great deal of
382 # ---- packed HTML spam, which is almost everybody in 2003, so it
383 # ---- used to be the default. But since spammers have shifted away
384 # ---- from this, it isn't the default any longer. IF you change
385 # ---- this, you MUST rebuild your .css files with roughly equal
386 # ---- amounts of locally-grown spam and nonspam ( if you've been
387 # ---- following instructions and using the "reaver" cache, this is
388 # ---- easily done! )
391 #:lcr: /[[:alnum:]]+/
392 #:lcr: /[-.,:[:alnum:]]+/
393 #:lcr: /[[:graph:]][-[:alnum:]]*[[:graph:]]?/
394 #:lcr: /[[:graph:]][-.,:[:alnum:]]*[[:graph:]]?/
396 # this next one is pretty incomprehensible, and probably wrong...
397 #:lcr: /[[:print:]][/!?\#]?[-[[:alnum:]][[:punct:]]]*(?:[*'=;]|/?>|:/*)?
400 # Expansions for antispamming. You almost _always_ want these on,
401 # unless you're debugging something really bizarre.
403 # --------- Do we enable spammus interruptus undo?
404 :undo_interruptus: /no/
405 #:undo_interruptus: /yes/
409 # ------------ HIGHLY EXPERIMENTAL - automatic training!
410 # enable this only if you really want to live VERY dangerously!
411 # "Do you feel lucky today, punk? Well, do ya?"
413 :automatic_training: /no/
415 # ---- if you are living dangerously and have turned on autotraining,
416 # you should also set the following to point to an address that
417 # will get read on a quick basis, becuause this is where autotrain
418 # verifications will go.
420 #:autotrain_address: /root/
423 :datadir: /..\/..\/.var\/.crm114/