| 1 |
# mailfilter.cf -- Config file for mailfilter, mailreaver, mailtrainer |
| 2 |
# |
| 3 |
# You MUST edit the fileds for "Secret Password", "mime decoder", and |
| 4 |
# "cache_dupe_command". Just those THREE things. |
| 5 |
# |
| 6 |
# Changes to all other values are optional. |
| 7 |
# |
| 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. |
| 13 |
# |
| 14 |
# After you edit this file, don't forget to edit 'rewrites.mfp' |
| 15 |
|
| 16 |
# --------->>> You MUST set the following correctly! <<<------- |
| 17 |
# |
| 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? |
| 21 |
# |
| 22 |
:spw: /DEFAULT_PASSWORD/ |
| 23 |
|
| 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. |
| 27 |
# |
| 28 |
#:verbose_startup: /SET/ |
| 29 |
:verbose_startup: // |
| 30 |
|
| 31 |
# |
| 32 |
# --------->>> You MUST set the following correctly! <<<------- |
| 33 |
# |
| 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. |
| 42 |
# |
| 43 |
#:do_base64: /no/ |
| 44 |
:do_base64: /yes/ |
| 45 |
# |
| 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/ |
| 52 |
|
| 53 |
|
| 54 |
# --------->>> You MUST set the following correctly! <<<------- |
| 55 |
# |
| 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. |
| 63 |
# |
| 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) |
| 67 |
# |
| 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). |
| 71 |
# |
| 72 |
:cache_dupe_command: /\/bin\/ln/ |
| 73 |
#:cache_dupe_command: /copy/ |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
########################################################################### |
| 78 |
# |
| 79 |
# END of things you absolutely MUST set. Feel free |
| 80 |
# to keep reading though... |
| 81 |
# |
| 82 |
########################################################################### |
| 83 |
|
| 84 |
########################################################################### |
| 85 |
# |
| 86 |
# START of things you might likely want to set. These |
| 87 |
# are probably OK for you, but many users change these things. |
| 88 |
# |
| 89 |
########################################################################## |
| 90 |
|
| 91 |
# ----------- define an optional target for where to send spam (that is, |
| 92 |
# ------------ emails that we want to "fail", or reject to another |
| 93 |
# ------------ address. Note that this is NOT a "program fault" address, |
| 94 |
# ------------ but where to send "bad" email to in the general case. |
| 95 |
# ------------ You can specify tightly controlled conditions too, |
| 96 |
# ------------ (see the next stanza) |
| 97 |
# ----------- To NOT forward this to another account, just leave the |
| 98 |
# ----------- address as the empty string, which is '//'. |
| 99 |
# ----------- This works fine especially if your mail reader program |
| 100 |
# ----------- can sort based on the ADV and UNS (or whatever you choose |
| 101 |
# ----------- to use as flagging strings) in the "Subject:" field. |
| 102 |
# ------- CAUTION- some systems are buggy and _REQUIRE_ a [email protected] |
| 103 |
# ----- in the following to forward spammy mail correctly. WTF??? :-( |
| 104 |
# |
| 105 |
#:general_fails_to: /[email protected]/ |
| 106 |
:general_fails_to: // |
| 107 |
|
| 108 |
|
| 109 |
# -------- If you would prefer to send specific kinds of spam to |
| 110 |
# -------- different mailboxes, here's where to do it. |
| 111 |
# -------- (be sure to uncomment the line!). Again, these are |
| 112 |
# --------- not "program fault" conditions, just different filter results. |
| 113 |
# |
| 114 |
# :fail_priority_mail_to: /where_priority_fails_go/ |
| 115 |
# :fail_blacklist_mail_to: /where_blacklist_fails_go/ |
| 116 |
# :fail_SSM_mail_to: /where_Classifier_fails_go_for_mailFILTER/ |
| 117 |
# :fail_classify_mail_to: /where_classifier_fails_go_for_mailREAVER/ |
| 118 |
|
| 119 |
|
| 120 |
# --------- Do we give nonspam, spam, and unsure an exitcode of 0 |
| 121 |
# --------- (for most standalone apps) or something else? |
| 122 |
# --------- Usually we use an exit code of 1 for "program fault", |
| 123 |
# --------- but change it if you need to use 0/1 for good/spam |
| 124 |
# --------- Don't use an exit code greater than 128 (it breaks BASH!) |
| 125 |
# --------- If you use exit codes (procmail doesn't) change it here. |
| 126 |
:rejected_mail_exit_code: /0/ |
| 127 |
:accepted_mail_exit_code: /0/ |
| 128 |
:unsure_mail_exit_code: /0/ |
| 129 |
:program_fault_exit_code: /1/ |
| 130 |
|
| 131 |
####################################################################### |
| 132 |
# |
| 133 |
# END of things you are likely to want to change. |
| 134 |
# |
| 135 |
# Anything following is starting to approach true customization. |
| 136 |
# Feel free to explore and poke around. |
| 137 |
###################################################################### |
| 138 |
|
| 139 |
# -----------Do we want to add the optional headers to the mail? |
| 140 |
# -----------If turned on, will add X-CRM114-Whatever: headers on each |
| 141 |
# -----------incoming email. (note- this does NOT turn off the cache-id header |
| 142 |
# |
| 143 |
:add_headers: /yes/ |
| 144 |
#:add_headers: /no/ |
| 145 |
|
| 146 |
|
| 147 |
# --------- do we add the statistics report? |
| 148 |
:add_verbose_stats: /yes/ |
| 149 |
#:add_verbose_stats: /no/ |
| 150 |
|
| 151 |
|
| 152 |
# --------- do we add the mailtrainer report to the top of the message body |
| 153 |
# --------- after training? |
| 154 |
:add_mailtrainer_report: /yes/ |
| 155 |
#:add_mailtrainer_report: /no/ |
| 156 |
|
| 157 |
|
| 158 |
# --------- Do we enable long-form explains (with lots of text)? |
| 159 |
# -- you can have no extra stuff, add it as text, or add it as an attachment. |
| 160 |
# -- (only available in mailfilter, not mailreaver) |
| 161 |
# |
| 162 |
:add_extra_stuff: /no/ |
| 163 |
# :add_extra_stuff: /text/ |
| 164 |
# :add_extra_stuff: /attachment/ |
| 165 |
|
| 166 |
|
| 167 |
# --------- Do we want to insert a "flagging" string on the subject line, |
| 168 |
# --------- perhaps to insert an 'ADV:' ? Whatever string we put here |
| 169 |
# --------- will be inserted at the front of the subject if we think the |
| 170 |
# --------- mail is spam. |
| 171 |
# |
| 172 |
# :spam_flag_subject_string: // |
| 173 |
:spam_flag_subject_string: /ADV:/ |
| 174 |
|
| 175 |
# --------- Do we want to insert a "flagging" string on the subject line |
| 176 |
# --------- for good email? Usually we don't.... so we set this to the |
| 177 |
# --------- null string - that is, // |
| 178 |
:good_flag_subject_string: // |
| 179 |
|
| 180 |
# ------------Similarly, do we want to insert a "flagging" string on |
| 181 |
# -------------the subject line of an "unsure" email? This way we know |
| 182 |
# --------------we need to train it even if "headers" is turned off. |
| 183 |
# :unsure_flag_subject_string: // |
| 184 |
:unsure_flag_subject_string: /UNS:/ |
| 185 |
|
| 186 |
# ------------- Do we want Training ConFirmation flags on the results of |
| 187 |
# ------------- a message to be learned? Default is "TCF:". |
| 188 |
:confirm_flag_subject_string: /TCF:/ |
| 189 |
#:confirm_flag_subject_string: // |
| 190 |
|
| 191 |
|
| 192 |
# --------- Do we want to do any "rewrites" to increase generality and |
| 193 |
# ---------- (usually) accuracy? IF 'yes', be sure to edit rewrites.mfp! |
| 194 |
# --------- NOTE: this option is somewhat slow. If your mailserver is |
| 195 |
# --------- maxed out on CPU, you might want to turn this off. |
| 196 |
# |
| 197 |
:rewrites_enabled: /yes/ |
| 198 |
#:rewrites_enabled: /no/ |
| 199 |
|
| 200 |
|
| 201 |
# --------- Do we copy incoming text into allmail.txt ? default is yes, but |
| 202 |
# --------- experienced users will probably set this to 'no' after testing |
| 203 |
# --------- their configuration for functionality. |
| 204 |
# |
| 205 |
:log_to_allmail.txt: /yes/ |
| 206 |
# :log_to_allmail.txt: /no/ |
| 207 |
|
| 208 |
# ------- Another logging option - log all mail to somewhere else |
| 209 |
# ------- entirely. Whatever pathname is given here will be prefixed |
| 210 |
# ------- by :fileprefix: |
| 211 |
# ------- To not use this, set it to the null string .. // |
| 212 |
# ------- Remember to backslash-escape path slashes! |
| 213 |
:log_all_mail_to_file: // |
| 214 |
#:log_all_mail_to_file: /my_personal_mail_log_file_name.txt/ |
| 215 |
|
| 216 |
# --------- When we log messages, should we use a mail separator? |
| 217 |
# --------- And, if so, what? |
| 218 |
:mail_separator: /\n-=-=-=-=-=-=- cut here -=-=-=-=-=-=-\n/ |
| 219 |
|
| 220 |
# |
| 221 |
# ---------- Message Cacheing for retraining - do we keep a cache of |
| 222 |
# ---------- messages we've classified recently "in the wild" as retrain |
| 223 |
# ---------- texts? This uses up some disk space, but means that we can |
| 224 |
# ---------- use mailtrainer.crm on these messages to autotune the classifier. |
| 225 |
# ---------- Default is to cache into the directory reaver_cache ; |
| 226 |
# ---------- if you don't want this, set it to // . If you don't use this, |
| 227 |
# ---------- you can't really use mailtrainer.crm, and you must keep your |
| 228 |
# ---------- headers scrupulously clean in all train messages. Recommended |
| 229 |
# ---------- to leave this unchanged unless you are VERY short of disk. |
| 230 |
# |
| 231 |
:text_cache: /reaver_cache/ |
| 232 |
# :text_cache: // |
| 233 |
|
| 234 |
|
| 235 |
# ----- How do we invoke the trainer (as in, just the invocation |
| 236 |
# ------ of CRM114 on mailtrainer.crm. Usually this is just obvious, |
| 237 |
# ------- but if you don't have CRM114 installed in the search path, here's |
| 238 |
# -------- where you can set trainer invocation to be via whatever path |
| 239 |
# --------- you want it (the second example is if you haven't installed |
| 240 |
# ---------- CRM114 at all, but are running the crm114_tre static binary |
| 241 |
# ----------- right out of the local directory.) |
| 242 |
# |
| 243 |
# -- use this next one if you have installed CRM114 with "make install" |
| 244 |
# -- (This is preferred and is the default) |
| 245 |
:trainer_invoke_command: /.\/mailtrainer.crm/ |
| 246 |
# |
| 247 |
# -- use this one if you can't do a "make install" and so must run the |
| 248 |
# --- crm114_tre binary directly out of the current working directory. |
| 249 |
# :trainer_invoke_command: /.\/crm114_tre mailtrainer.crm / |
| 250 |
|
| 251 |
|
| 252 |
# ------ If we're cacheing for retraining, we're probably using |
| 253 |
# ------ mailtrainer.crm or some other variant. In that case, |
| 254 |
# ------ you will want a "randomizer" to present the training |
| 255 |
# ------ examples to the classifier in some random but balanced order. |
| 256 |
# ------ You have two choices - you can either use the "sort" |
| 257 |
# ------ command on some random character in the filename (this |
| 258 |
# ------ is NOT recommended) or use the "shuffle.crm" program. |
| 259 |
# ------ We _strongly_ recommend using shuffle.crm; the default |
| 260 |
# ------ options to shuffle.crm will work fine. Alternatively, |
| 261 |
# ------ you can use the "sort --key 1.2" on date-named files to |
| 262 |
# ----- achieve chronological training |
| 263 |
:trainer_randomizer_command: /.\/shuffle.crm/ |
| 264 |
#:trainer_randomizer_command: /.\/crm114 shuffle.crm/ |
| 265 |
#:trainer_randomizer_command: /sort --key 1.2/ |
| 266 |
|
| 267 |
|
| 268 |
# --------- Do we log rejected mail to a file? default yes, but most |
| 269 |
# --------- users should set this to no after testing their |
| 270 |
# --------- configuration to verify that rejected mail goes to the |
| 271 |
# --------- reject address. Only works in mailfilter.crm |
| 272 |
# |
| 273 |
:log_rejections: /yes/ |
| 274 |
#:log_rejections: /no/ |
| 275 |
|
| 276 |
# ------- alternate rejection logging - set this pathname to non-null |
| 277 |
# ------ to log rejections elsewhere. Only for mailreaver.crm. |
| 278 |
# ----- Set to NULL ( // ) to turn this off. |
| 279 |
:log_rejections_to_file: // |
| 280 |
#:log_rejections_to_file /this_is_my_rejected_email_log_file.txt/ |
| 281 |
|
| 282 |
|
| 283 |
# ----------Do we want to enable "inoculation by email"? |
| 284 |
# --------(leave this off unless you want RFC inoculations) |
| 285 |
# |
| 286 |
:inoculations_enabled: /no/ |
| 287 |
#:inoculations_enabled: /yes/ |
| 288 |
|
| 289 |
|
| 290 |
# --------- How many characters of the input do we really trust to be |
| 291 |
# ---------- worthy of classification? Usually the first few thousand |
| 292 |
# ----------- bytes of the message tell more than enough (though we've |
| 293 |
# ------------ been "noticed" by spammers, who are now packing 4K of |
| 294 |
# ------------- innocuous text into their headers. No problemo... :) ) |
| 295 |
# |
| 296 |
#:decision_length: /4096/ |
| 297 |
#:decision_length: /64000/ |
| 298 |
:decision_length: /16000/ |
| 299 |
# ----- for entropy users ONLY - 4K is plenty! |
| 300 |
#:decision_length: /4096/ |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
# ------------ Do we want to expand URLs (that is, fetching the contents |
| 305 |
# ------------- of a URL and inserting that after the url itself?) |
| 306 |
# -------------- By default this is off, but turn it on if you want |
| 307 |
# --------------- to experiment. |
| 308 |
:expand_urls: /no/ |
| 309 |
# :expand_urls: /yes/ |
| 310 |
# |
| 311 |
# WGET options - 30-second timeout, output to stdout. |
| 312 |
# HACK - use the proper --user-agent="IEblahblah" for max effect! |
| 313 |
:url_fetch_cmd: /wget -T 30 -O - / |
| 314 |
# and trim the URL text to not more than 16bytes of text. |
| 315 |
:url_trim_cmd: / head -c 16000 / |
| 316 |
|
| 317 |
|
| 318 |
####################################################################### |
| 319 |
# |
| 320 |
# ------------------- YOU REALLY SHOULD STOP HERE ------------------- |
| 321 |
# --------- values below this line are usually OK for almost all |
| 322 |
# --------- users to use unchanged - Gurus only beyond this point. |
| 323 |
# |
| 324 |
####################################################################### |
| 325 |
# |
| 326 |
# If you want to change things here, go ahead, but realize you are |
| 327 |
# playing with things that can really hurt accuracy. |
| 328 |
# |
| 329 |
# This being open source, if you don't *think* about changing it, |
| 330 |
# what would be the use of it being open source? That said, this |
| 331 |
# _is_ open source- you break it, you get to keep _both_ pieces! |
| 332 |
# |
| 333 |
# |
| 334 |
# ------------ CLF - The Classifier Flags ---------- |
| 335 |
# |
| 336 |
# --------- Which classifier flags do we use? Default for 20060101 has |
| 337 |
# --------- been changed to OSB UNIQUE MICROGROOM. |
| 338 |
# |
| 339 |
# --------- A null setting gets you straight Markovian, without |
| 340 |
# --------- microgrooming. OSB uses less memory, is faster, |
| 341 |
# --------- and is usually more accurate. Correlative matching is |
| 342 |
# --------- 100x - 1000x slower, but can match anything (binaries, |
| 343 |
# --------- wide chars, unicode, virii, _anything_. Winnow is a |
| 344 |
# --------- non-statistical learning classificer with very nice |
| 345 |
# --------- accuracy (up to 2x SBPH). Hyperspace is a pseudogaussian |
| 346 |
# --------- KNN (K-nearest-neighbor) matcher. |
| 347 |
# |
| 348 |
# --------- This is also where we set whether to use microgrooming |
| 349 |
# --------- or Arne optimization (they're currently mutually exclusive). |
| 350 |
# --------- If you turn off microgrooming you get Arne optimization |
| 351 |
# --------- automatically. |
| 352 |
# |
| 353 |
# --------- If you _change_ this, you _must_ empty out your .css or |
| 354 |
# --------- .cow files and build fresh ones, because these |
| 355 |
# --------- classifiers do NOT use compatible data storage formats! |
| 356 |
# |
| 357 |
#:clf: /microgroom/ |
| 358 |
#:clf: /osb/ |
| 359 |
#:clf: /osb microgroom/ |
| 360 |
:clf: /osb unique microgroom/ |
| 361 |
#:clf: /correlate/ |
| 362 |
#:clf: /winnow/ |
| 363 |
#:clf: /osbf/ |
| 364 |
#:clf: /osbf microgroom/ |
| 365 |
#:clf: /hyperspace/ |
| 366 |
#:clf: /hyperspace unique/ |
| 367 |
# |
| 368 |
# |
| 369 |
# |
| 370 |
# --------Thresholds for GOOD/UNSURE/SPAM thick-threshold training |
| 371 |
# ------- |
| 372 |
# ------ A very small thick threshold (or zero!) works for Markovian. |
| 373 |
# ----- A thick threshold of 5 to 20 seems good for OSB, OSBF, |
| 374 |
# ---- Hyperspace, Bit-Entropy, and Winnow. If you want an asymmetric |
| 375 |
# --- threshold system, you can do that by having :good_threshold: |
| 376 |
# -- be different from :spam_threshold:. The defaults are +/- 10.0 |
| 377 |
# |
| 378 |
# |
| 379 |
# ---- Things rated equal to or better than this are GOOD email |
| 380 |
#:good_threshold: /0.01/ |
| 381 |
#:good_threshold: /5.0/ |
| 382 |
:good_threshold: /10.0/ |
| 383 |
#:good_threshold: /20.0/ |
| 384 |
# |
| 385 |
# ---- Things rated less than or equal to this are SPAM |
| 386 |
#:spam_threshold: /-0.01/ |
| 387 |
:spam_threshold: /-5.0/ |
| 388 |
#:spam_threshold: /-10.0/ |
| 389 |
#:spam_threshold: /-20.0/ |
| 390 |
|
| 391 |
# ---- mailfilter uses a single threshold and operates symmetrically. |
| 392 |
# --- (this is only to provide backward compatibility) |
| 393 |
:thick_threshold: /5.0/ |
| 394 |
|
| 395 |
# ---- What regex do we use for LEARN/CLASSIFY? the first is the |
| 396 |
# ---- "old standard". Other ones are handy for different spam |
| 397 |
# ---- mixes. The last one is for people who get a great deal of |
| 398 |
# ---- packed HTML spam, which is almost everybody in 2003, so it |
| 399 |
# ---- used to be the default. But since spammers have shifted away |
| 400 |
# ---- from this, it isn't the default any longer. IF you change |
| 401 |
# ---- this, you MUST rebuild your .css files with decent |
| 402 |
# ---- amounts of locally-grown spam and nonspam ( if you've been |
| 403 |
# ---- following instructions and using the "reaver" cache, this is |
| 404 |
# ---- easily done! ) |
| 405 |
# |
| 406 |
:lcr: /[[:graph:]]+/ |
| 407 |
#:lcr: /[[:alnum:]]+/ |
| 408 |
#:lcr: /[-.,:[:alnum:]]+/ |
| 409 |
#:lcr: /[[:graph:]][-[:alnum:]]*[[:graph:]]?/ |
| 410 |
#:lcr: /[[:graph:]][-.,:[:alnum:]]*[[:graph:]]?/ |
| 411 |
# |
| 412 |
# this next one is pretty incomprehensible, and probably wrong... |
| 413 |
#:lcr: /[[:print:]][/!?\#]?[-[[:alnum:]][[:punct:]]]*(?:[*'=;]|/?>|:/*)? |
| 414 |
# |
| 415 |
# |
| 416 |
# Expansions for antispamming. You almost _always_ want these on, |
| 417 |
# unless you're debugging something really bizarre. |
| 418 |
|
| 419 |
# --------- Do we enable spammus interruptus undo? |
| 420 |
:undo_interruptus: /no/ |
| 421 |
#:undo_interruptus: /yes/ |
| 422 |
# |
| 423 |
# |
| 424 |
# |
| 425 |
# ------------ HIGHLY EXPERIMENTAL - automatic training! |
| 426 |
# enable this only if you really want to live VERY dangerously! |
| 427 |
# "Do you feel lucky today, punk? Well, do ya?" |
| 428 |
# |
| 429 |
:automatic_training: /no/ |
| 430 |
# |
| 431 |
# ---- if you are living dangerously and have turned on autotraining, |
| 432 |
# you should also set the following to point to an address that |
| 433 |
# will get read on a quick basis, becuause this is where autotrain |
| 434 |
# verifications will go. |
| 435 |
# |
| 436 |
#:autotrain_address: /root/ |
| 437 |
# |