comparison lisp/mh-e/mh-junk.el @ 67244:6521056180e7

(mh-bogofilter-blacklist, mh-bogofilter-whitelist): Bogofilter is lowercase except at beginning of sentence and in titles.
author Bill Wohler <wohler@newt.com>
date Fri, 02 Dec 2005 04:54:06 +0000
parents 4520ae2624f2
children 2ae99b10dd40
comparison
equal deleted inserted replaced
67243:4f8e0edba613 67244:6521056180e7
304 ;; Bogofilter Interface 304 ;; Bogofilter Interface
305 305
306 (defvar mh-bogofilter-executable (executable-find "bogofilter")) 306 (defvar mh-bogofilter-executable (executable-find "bogofilter"))
307 307
308 (defun mh-bogofilter-blacklist (msg) 308 (defun mh-bogofilter-blacklist (msg)
309 "Blacklist MSG with Bogofilter. 309 "Blacklist MSG with bogofilter.
310 310
311 Bogofilter is a Bayesian spam filtering program. Get it from your local 311 Bogofilter is a Bayesian spam filtering program. Get it from your local
312 distribution or from http://bogofilter.sourceforge.net/. 312 distribution or from http://bogofilter.sourceforge.net/.
313 313
314 Bogofilter is taught by running: 314 Bogofilter is taught by running:
322 on every spam message. This is called a full training; three other 322 on every spam message. This is called a full training; three other
323 training methods are described in the FAQ that is distributed with bogofilter. 323 training methods are described in the FAQ that is distributed with bogofilter.
324 Note that most Bayesian filters need 1000 to 5000 of each type of message to 324 Note that most Bayesian filters need 1000 to 5000 of each type of message to
325 start doing a good job. 325 start doing a good job.
326 326
327 To use Bogofilter, add the following recipes to `.procmailrc': 327 To use bogofilter, add the following recipes to `.procmailrc':
328 328
329 MAILDIR=$HOME/`mhparam Path` 329 MAILDIR=$HOME/`mhparam Path`
330 330
331 # Fight spam with Bogofilter. 331 # Fight spam with bogofilter.
332 :0fw 332 :0fw
333 | bogofilter -3 -e -p 333 | bogofilter -3 -e -p
334 334
335 :0: 335 :0:
336 * ^X-Bogosity: Yes, tests=bogofilter 336 * ^X-Bogosity: Yes, tests=bogofilter
338 338
339 :0: 339 :0:
340 * ^X-Bogosity: Unsure, tests=bogofilter 340 * ^X-Bogosity: Unsure, tests=bogofilter
341 spam/unsure/. 341 spam/unsure/.
342 342
343 If Bogofilter classifies a message incorrectly, or is unsure, you can use the 343 If bogofilter classifies a message incorrectly, or is unsure, you can use the
344 MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to update 344 MH-E commands \\[mh-junk-blacklist] and \\[mh-junk-whitelist] to update
345 Bogofilter's training. 345 bogofilter's training.
346 346
347 The \"Bogofilter FAQ\" suggests that you run the following 347 The \"Bogofilter FAQ\" suggests that you run the following
348 occasionally to shrink the database: 348 occasionally to shrink the database:
349 349
350 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new 350 bogoutil -d wordlist.db | bogoutil -l wordlist.db.new
357 (let ((msg-file (mh-msg-filename msg mh-current-folder))) 357 (let ((msg-file (mh-msg-filename msg mh-current-folder)))
358 (call-process mh-bogofilter-executable msg-file mh-junk-background 358 (call-process mh-bogofilter-executable msg-file mh-junk-background
359 nil "-s"))) 359 nil "-s")))
360 360
361 (defun mh-bogofilter-whitelist (msg) 361 (defun mh-bogofilter-whitelist (msg)
362 "Whitelist MSG with Bogofilter. 362 "Whitelist MSG with bogofilter.
363 363
364 See `mh-bogofilter-blacklist' for more information." 364 See `mh-bogofilter-blacklist' for more information."
365 (unless mh-bogofilter-executable 365 (unless mh-bogofilter-executable
366 (error "Unable to find the bogofilter executable")) 366 (error "Unable to find the bogofilter executable"))
367 (let ((msg-file (mh-msg-filename msg mh-current-folder))) 367 (let ((msg-file (mh-msg-filename msg mh-current-folder)))