[cvs] bogofilter Makefile.am,1.18,1.19 autodaemon.c,1.2,1.3 autodaemon.h,1.2,1.3 bogofilter.c,1.29,1
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
Update of /cvsroot/bogofilter/bogofilter In directory usw-pr-cvs1:/tmp/cvs-serv22529 Modified Files: Makefile.am autodaemon.c autodaemon.h bogofilter.c bogofilter.h bogofilter.spec.in bogoutil.c common.h configure.in datastore.h datastore_db.c datastore_db.h lexer.h lexer.l main.c wordhash.c wordhash.h wordlists.c wordlists.h xmalloc.c xmalloc.h Log Message: This is the huge $Log$ remove checkin. Makefile.am | 76 ---------------------------- autodaemon.c | 8 -- autodaemon.h | 8 -- bogofilter.c | 143 ----------------------------------------------------- bogofilter.h | 69 ------------------------- bogofilter.spec.in | 23 -------- bogoutil.c | 6 -- common.h | 6 -- configure.in | 26 --------- datastore.h | 11 ---- datastore_db.c | 11 ---- datastore_db.h | 7 -- lexer.h | 6 -- lexer.l | 61 ---------------------- main.c | 111 ----------------------------------------- wordhash.c | 24 -------- wordhash.h | 6 -- wordlists.c | 27 ---------- wordlists.h | 30 ----------- xmalloc.c | 6 -- xmalloc.h | 6 -- 21 files changed, 2 insertions(+), 669 deletions(-) Index: Makefile.am =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/Makefile.am,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Makefile.am 4 Oct 2002 20:12:27 -0000 1.18 --- Makefile.am 6 Oct 2002 01:44:17 -0000 1.19 *************** *** 1,79 **** # $Id$ - # $Log$ - # Revision 1.18 2002/10/04 20:12:27 relson - # Added common.h to bogofilter_SOURCES. - # - # Revision 1.17 2002/10/04 01:29:33 m-a - # (dbh_free) Fix memory leak: handle->name not freed. - # Switch to xstrdup. - # - # Revision 1.16 2002/10/04 00:31:30 m-a - # Add convenience function xstrdup() which is a xmalloc() variant of strdup. - # - # Revision 1.15 2002/10/02 16:27:40 relson - # Initial inclusion of multiple wordlist code into bogofilter. - # - # Revision 1.14 2002/09/29 03:37:56 gyepi - # replace Judy with hash table (wordhash) - # - # Revision 1.13 2002/09/26 23:13:12 relson - # Changed name of lexer_l.l to lexer.l for consistency with other filenames. - # - # Revision 1.12 2002/09/25 00:51:07 adrian_otto - # Removed referenced to lock.c and lock.h, because they have been obviated. - # - # Revision 1.11 2002/09/24 12:46:47 gyepi - # added bogoupgrade.pl - # - # Revision 1.10 2002/09/24 04:34:19 gyepi - # - # - # Modified Files: - # Makefile.am -- add entries for datastore* + and other new files - # bogofilter.c bogofilter.h main.c -- fixup to use database abstraction - # - # Added Files: - # datastore_db.c datastore_db.h datastore.h -- database abstraction. Also implements locking - # xmalloc.c xmalloc.h -- utility - # bogoutil.c -- dump/restore utility. - # - # 1. Implements database abstraction as discussed. - # Also implements multiple readers/single writer file locking. - # - # 2. Adds utility to dump/restore databases. - # - # Revision 1.9 2002/09/18 23:33:48 relson - # Added lexer.h to bogofilter_SOURCES list. - # - # Revision 1.8 2002/09/18 20:56:43 m-a - # Let automake deal with the lexer. - # - # Revision 1.7 2002/09/17 06:21:28 adrian_otto - # Changed flex to $(LEX) - # - # Revision 1.6 2002/09/17 02:16:37 adrian_otto - # Re-aranged the makefile so that the autoconfigured Makefile gets a correct - # rule for cleaning lexertest. - # - # Revision 1.5 2002/09/17 01:47:51 adrian_otto - # Fixed the Makefile configuration so that it knows how to build the man - # page properly. Updated the man page to reflect the Sourceforge web site, - # which contains references to ESR's site. - # - # Revision 1.4 2002/09/17 01:20:24 adrian_otto - # Modified Makefile configuration so that lexer_l.c gets deleted when the - # mostlyclean target gets hit. This file is auto-generated by flex. - # - # Revision 1.3 2002/09/17 01:13:32 adrian_otto - # Fixed Makefile.am to build lexer_l.c automatically. Removed lexer_l.c from - # the CVS archive. - # - # Revision 1.2 2002/09/16 19:24:53 m-a - # Add missing .h files and list man1_MANS in EXTRA_DIST - # so that 'make distcheck' works. - # - # Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto - # 0.7.3 Base Source - # # foreign: don't insist on ChangeLog --- 1,3 ---- Index: autodaemon.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/autodaemon.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** autodaemon.c 23 Sep 2002 11:31:53 -0000 1.2 --- autodaemon.c 6 Oct 2002 01:44:17 -0000 1.3 *************** *** 1,12 **** /* $Id$ */ /* - * $Log$ - * Revision 1.2 2002/09/23 11:31:53 m-a - * Unnest comments, and move $ line down by one to prevent CVS from adding nested comments again. - * - * Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto - * 0.7.3 Base Source - * */ - /***************************************************************************** NAME: --- 1,4 ---- Index: autodaemon.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/autodaemon.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** autodaemon.h 23 Sep 2002 11:31:53 -0000 1.2 --- autodaemon.h 6 Oct 2002 01:44:17 -0000 1.3 *************** *** 1,11 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.2 2002/09/23 11:31:53 m-a - * Unnest comments, and move $ line down by one to prevent CVS from adding nested comments again. - * - * Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto - * 0.7.3 Base Source - * */ // autodaemon.h -- lightweight library for daemon processes --- 1,3 ---- Index: bogofilter.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/bogofilter.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** bogofilter.c 4 Oct 2002 18:08:26 -0000 1.29 --- bogofilter.c 6 Oct 2002 01:44:17 -0000 1.30 *************** *** 1,146 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.29 2002/10/04 18:08:26 relson - * Added a '-u' (update) option so that the appropriate wordlist, i.e. spamlist.db - * or goodlist.db, is updated after classifying the message. - * - * Revision 1.28 2002/10/04 02:06:55 gyepi - * - * 1. Use multiple buffer lists in wordhash to avoid alignment problems - * on more restrictive architectures. - * 2. Add initializer arg to wordhash_insert. - * - * Thanks to Clint Adams for helping debug both of these. - * - * Revision 1.27 2002/10/04 00:39:57 m-a - * First set of type fixes. - * - * Revision 1.26 2002/10/03 17:57:06 relson - * Changed interface to lexer.l as a first step towards adding the advanced - * tokenizing features of spambayes into bogofilter. - * - * Thanks to Mark Hoffman for this work. - * - * Revision 1.25 2002/10/02 17:19:42 relson - * Removed unneeded #include statements. - * - * Revision 1.24 2002/10/02 17:09:04 gyepi - * switch to general database locking protocol - * - * Revision 1.23 2002/10/02 16:27:40 relson - * Initial inclusion of multiple wordlist code into bogofilter. - * - * Revision 1.22 2002/10/02 16:12:53 relson - * Added SIZEOF(array) macro for readability of for loops iterating over arrays, particularly the extrema array. - * - * Revision 1.21 2002/09/29 03:40:54 gyepi - * - * Modified: bogofilter.c bogofilter.h main.c - * 1. replace Judy with hash table (wordhash) - * 2. ensure that databases are always locked in the same order. - * - * Apologies for simultaneously submitting loosely related changes. - * - * Revision 1.20 2002/09/27 01:18:38 gyepi - * removed unused #defines and logprint function - * - * Revision 1.19 2002/09/26 23:04:40 relson - * documentation: - * changed to refer to "good" and "spam" tokens and lists. - * removed '-l' option as this function is now in bogoutil. - * - * filenames: - * changed database from "hamlist.db" to "goodlist.db". - * - * variables: - * renamed "ham_list" and "hamness" to "good_list" and "goodness". - * - * Revision 1.18 2002/09/25 00:51:07 adrian_otto - * Removed referenced to lock.c and lock.h, because they have been obviated. - * - * Revision 1.17 2002/09/24 19:47:49 m-a - * Add missing #include "datastore.h". Drop unused strlwr. - * - * Revision 1.16 2002/09/24 04:34:19 gyepi - * - * - * Modified Files: - * Makefile.am -- add entries for datastore* + and other new files - * bogofilter.c bogofilter.h main.c -- fixup to use database abstraction - * - * Added Files: - * datastore_db.c datastore_db.h datastore.h -- database abstraction. Also implements locking - * xmalloc.c xmalloc.h -- utility - * bogoutil.c -- dump/restore utility. - * - * 1. Implements database abstraction as discussed. - * Also implements multiple readers/single writer file locking. - * - * 2. Adds utility to dump/restore databases. - * - * Revision 1.15 2002/09/23 11:35:51 m-a - * Fix GCC 3.2 warnings. - * - * Revision 1.14 2002/09/23 11:31:53 m-a - * Unnest comments, and move $ line down by one to prevent CVS from adding nested comments again. - * - * Revision 1.13 2002/09/23 10:08:49 m-a - * Integrate patch by Zeph Hull and Clint Adams to present spamicity in - * X-Spam-Status header in bogofilter -p mode. - * - * Revision 1.12 2002/09/22 21:26:28 relson - * Remove the definition and use of strlwr() since get_token() in lexer_l.l already converts the token to lower case. - * - * Revision 1.11 2002/09/19 03:20:32 relson - * Move "msg_prob" assignment to proper function, i.e. from select_indicators() to compute_probability(). - * Move some local variables from the beginning of the function to the innermost block where they're needed. - * - * Revision 1.10 2002/09/18 22:41:07 relson - * Separated probability calculation out of select_indicators() into new function compute_probability(). - * - * Revision 1.7 2002/09/15 19:22:51 relson - * Refactor the main bogofilter() function into three smaller, more coherent pieces: - * - * void *collect_words(int fd) - * - returns a set of tokens in a Judy array - * - * bogostat_t *select_indicators(void *PArray) - * - processes the set of words - * - returns an array of spamicity indicators (words & probabilities) - * - * double compute_spamicity(bogostat_t *stats) - * - processes the array of spamicity indicators - * - returns the spamicity - * - * rc_t bogofilter(int fd) - * - calls the 3 component functions - * - returns RC_SPAM or RC_NONSPAM - * - * Revision 1.6 2002/09/15 19:07:13 relson - * Add an enumerated type for return codes of RC_SPAM and RC_NONSPAM, which values of 0 and 1 as called for by procmail. - * Use the new codes and type for bogofilter() and when generating the X-Spam-Status message. - * - * Revision 1.5 2002/09/15 18:29:04 relson - * bogofilter.c: - * - * Use a Judy array to provide a set of (unique) tokens to speed up the filling of the stat.extrema array. - * - * Revision 1.4 2002/09/15 17:41:20 relson - * The printing of tokens used for computing the spamicity has been changed. They are now printed in increasing order (by probability and alphabet). The cumulative spamicity is also printed. - * - * The spamicity element of the bogostat_t struct has become a local variable in bogofilter() as it didn't need to be in the struct. - * - * Revision 1.3 2002/09/15 16:37:27 relson - * Implement Eric Seppanen's fix so that bogofilter() properly populates the stats.extrema array. - * A new word goes into the first empty slot of the array. If there are no empty slots, it replaces - * the word with the spamicity index closest to 0.5. - * - * Revision 1.2 2002/09/15 16:16:50 relson - * Clean up underflow checking for word counts by using max() instead of if...then... - * - * Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto - * 0.7.3 Base Source - * */ /***************************************************************************** --- 1,3 ---- Index: bogofilter.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/bogofilter.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** bogofilter.h 4 Oct 2002 18:08:26 -0000 1.12 --- bogofilter.h 6 Oct 2002 01:44:17 -0000 1.13 *************** *** 1,72 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.12 2002/10/04 18:08:26 relson - * Added a '-u' (update) option so that the appropriate wordlist, i.e. spamlist.db - * or goodlist.db, is updated after classifying the message. - * - * Revision 1.11 2002/10/02 16:27:40 relson - * Initial inclusion of multiple wordlist code into bogofilter. - * - * Revision 1.10 2002/09/29 03:40:54 gyepi - * - * Modified: bogofilter.c bogofilter.h main.c - * 1. replace Judy with hash table (wordhash) - * 2. ensure that databases are always locked in the same order. - * - * Apologies for simultaneously submitting loosely related changes. - * - * Revision 1.9 2002/09/27 01:17:38 gyepi - * removed unused bogodump declaration - * - * Revision 1.8 2002/09/26 23:04:41 relson - * documentation: - * changed to refer to "good" and "spam" tokens and lists. - * removed '-l' option as this function is now in bogoutil. - * - * filenames: - * changed database from "hamlist.db" to "goodlist.db". - * - * variables: - * renamed "ham_list" and "hamness" to "good_list" and "goodness". - * - * Revision 1.7 2002/09/26 17:22:01 relson - * Remove unused function prototypes. - * - * Revision 1.6 2002/09/24 04:34:19 gyepi - * - * - * Modified Files: - * Makefile.am -- add entries for datastore* + and other new files - * bogofilter.c bogofilter.h main.c -- fixup to use database abstraction - * - * Added Files: - * datastore_db.c datastore_db.h datastore.h -- database abstraction. Also implements locking - * xmalloc.c xmalloc.h -- utility - * bogoutil.c -- dump/restore utility. - * - * 1. Implements database abstraction as discussed. - * Also implements multiple readers/single writer file locking. - * - * 2. Adds utility to dump/restore databases. - * - * Revision 1.5 2002/09/23 11:31:53 m-a - * Unnest comments, and move $ line down by one to prevent CVS from adding nested comments again. - * - * Revision 1.4 2002/09/23 10:08:49 m-a - * Integrate patch by Zeph Hull and Clint Adams to present spamicity in - * X-Spam-Status header in bogofilter -p mode. - * - * Revision 1.3 2002/09/18 22:30:22 relson - * Created lexer.h with the definitions needed by lexer_l.l from bogofilter.h. - * This removes the compile-time dependency between the two files. - * - * Revision 1.2 2002/09/15 19:07:12 relson - * Add an enumerated type for return codes of RC_SPAM and RC_NONSPAM, which values of 0 and 1 as called for by procmail. - * Use the new codes and type for bogofilter() and when generating the X-Spam-Status message. - * - * Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto - * 0.7.3 Base Source - * */ /* constants and declarations for bogofilter */ --- 1,3 ---- Index: bogofilter.spec.in =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/bogofilter.spec.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bogofilter.spec.in 4 Oct 2002 23:16:00 -0000 1.3 --- bogofilter.spec.in 6 Oct 2002 01:44:17 -0000 1.4 *************** *** 1,25 **** # $Id$ ! # $Log$ ! # Revision 1.3 2002/10/04 23:16:00 gyepi ! # allow man page to be uncompressed ! # ! # Revision 1.2 2002/09/24 12:47:09 gyepi ! # added bogoupgrade.pl + UPGRADE ! # ! # Revision 1.1 2002/09/17 11:33:37 m-a ! # Build .spec automatically from .spec.in. ! # In the .spec file: include all documentation, add --manpath and , ! # and add %defattr to the %files section. ! # ! # Revision 1.3 2002/09/17 07:21:54 adrian_otto ! # Removed ChangeLog section. Information was redundant with the NEWS file, ! # and was causing problems for 'rpmbuild'. ! # ! # Revision 1.2 2002/09/17 06:39:49 adrian_otto ! # Updating for release. Added NEWS items. ! # ! # Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto ! # 0.7.3 Base Source ! # Name: @PACKAGE@ Version: @VERSION@ --- 1,4 ---- # $Id$ ! Name: @PACKAGE@ Version: @VERSION@ Index: bogoutil.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/bogoutil.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bogoutil.c 4 Oct 2002 04:01:51 -0000 1.2 --- bogoutil.c 6 Oct 2002 01:44:17 -0000 1.3 *************** *** 1,9 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.2 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ /***************************************************************************** --- 1,3 ---- Index: common.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/common.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** common.h 4 Oct 2002 04:01:51 -0000 1.3 --- common.h 6 Oct 2002 01:44:17 -0000 1.4 *************** *** 1,9 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.3 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ #ifndef COMMON_H_GUARD --- 1,3 ---- Index: configure.in =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/configure.in,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** configure.in 29 Sep 2002 03:37:56 -0000 1.7 --- configure.in 6 Oct 2002 01:44:17 -0000 1.8 *************** *** 1,29 **** # $Id$ - # $Log$ - # Revision 1.7 2002/09/29 03:37:56 gyepi - # replace Judy with hash table (wordhash) - # - # Revision 1.6 2002/09/17 11:35:08 m-a - # Remove check for [v]fork(), bogofilter does not fork() at the moment. - # - # Revision 1.5 2002/09/17 11:33:37 m-a - # Build .spec automatically from .spec.in. - # In the .spec file: include all documentation, add --manpath and , - # and add %defattr to the %files section. - # - # Revision 1.4 2002/09/17 06:19:27 adrian_otto - # Added check for <sys/file.h> - # - # Revision 1.3 2002/09/17 01:51:53 adrian_otto - # Prepared this snapshot for 0.7.4 release - # - # Revision 1.2 2002/09/17 01:30:21 adrian_otto - # Improved configure script for locking functions, and improved the error - # messag when the configure script can't find a suitable BerkeleyDB version - # installed. - # - # Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto - # 0.7.3 Base Source - # AC_INIT(bogofilter.c) AM_INIT_AUTOMAKE(bogofilter, 0.7.4) --- 1,3 ---- Index: datastore.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/datastore.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** datastore.h 4 Oct 2002 11:58:46 -0000 1.5 --- datastore.h 6 Oct 2002 01:44:17 -0000 1.6 *************** *** 1,14 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.5 2002/10/04 11:58:46 relson - * Removed obsolete "file" field from wordlist_t. - * Cleaned up list name, directory, and filename code in open_wordlist(). - * Changed parameters to "const char *" for open_wordlist(), dbh_init(), and db_open(). - * - * Revision 1.4 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ /* --- 1,3 ---- Index: datastore_db.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/datastore_db.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** datastore_db.c 4 Oct 2002 11:58:46 -0000 1.9 --- datastore_db.c 6 Oct 2002 01:44:17 -0000 1.10 *************** *** 1,14 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.9 2002/10/04 11:58:46 relson - * Removed obsolete "file" field from wordlist_t. - * Cleaned up list name, directory, and filename code in open_wordlist(). - * Changed parameters to "const char *" for open_wordlist(), dbh_init(), and db_open(). - * - * Revision 1.8 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ /***************************************************************************** --- 1,3 ---- Index: datastore_db.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/datastore_db.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** datastore_db.h 4 Oct 2002 04:01:51 -0000 1.3 --- datastore_db.h 6 Oct 2002 01:44:17 -0000 1.4 *************** *** 1,10 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.3 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ - #ifndef DATASTORE_DB3_H_GUARD --- 1,3 ---- Index: lexer.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/lexer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lexer.h 4 Oct 2002 04:01:51 -0000 1.4 --- lexer.h 6 Oct 2002 01:44:17 -0000 1.5 *************** *** 1,9 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.4 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ // length of *yylval will not exceed this... --- 1,3 ---- Index: lexer.l =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/lexer.l,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lexer.l 4 Oct 2002 11:09:26 -0000 1.5 --- lexer.l 6 Oct 2002 01:44:17 -0000 1.6 *************** *** 1,65 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.5 2002/10/04 11:09:26 relson - * Made the TOKEN recognition pattern a bit more thorough in excluding carriage returns. - * - * Revision 1.4 2002/10/03 17:57:06 relson - * Changed interface to lexer.l as a first step towards adding the advanced - * tokenizing features of spambayes into bogofilter. - * - * Thanks to Mark Hoffman for this work. - * - * Revision 1.3 2002/10/02 19:04:55 relson - * Don't allow carriage returns, '\r', in tokens. - * - * Revision 1.2 2002/09/26 23:40:20 relson - * Added directive so that loginfo is included in file. - * - */ - /**** - ** - ** Revision 1.9 2002/09/25 22:29:21 relson - ** Correct handling of multi-line "X-Spam-Whatever" headers by correctly ordering - ** the if() statements and by checking for an empty line. - ** - ** Add parameter prototypes so that fewer casts are needed. - ** - ** Revision 1.8 2002/09/25 00:02:44 relson - ** Ignore older X-Spam-[...Whatever...] lines. - ** - ** Revision 1.7 2002/09/23 11:31:53 m-a - ** Unnest comments, and move $ line down by one to prevent CVS from adding nested comments again. - ** - ** Revision 1.6 2002/09/22 21:24:36 relson - ** Modify the lexer to allow the full range of alphabetic characters. - ** Thanks to Clint Adams for the new token matching expression. - ** - ** Revision 1.5 2002/09/18 22:30:22 relson - ** Created lexer.h with the definitions needed by lexer_l.l from bogofilter.h. - ** This removes the compile-time dependency between the two files. - ** - ** Revision 1.4 2002/09/18 20:56:43 m-a - ** Let automake deal with the lexer. - ** - ** Revision 1.3 2002/09/16 18:58:14 m-a - ** Fix 'last line occasionally emitted twice' bug, cleaning up our yyinput(). - ** - ** Revision 1.2 2002/09/15 15:52:24 relson - ** - ** - ** Makefile.in: - ** - fix .l.c rule so that lexer_l.c is correctly generated from lexer_l.l - ** - added lexer_l.c to target mostlyclean-compile - ** - removed lexer_l.c from DIST_COMMON. As it can can be generated, it no longer needs to be distributed. - ** - added target lexertest (from original bogofilter release) - ** - ** lexer_l.l: - ** - defined global variable passthrough so that linking lexertest succeeds. - ** - ** Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto - ** 0.7.3 Base Source - ** */ %{ /* --- 1,4 ---- Index: main.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/main.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** main.c 6 Oct 2002 00:27:25 -0000 1.24 --- main.c 6 Oct 2002 01:44:17 -0000 1.25 *************** *** 1,114 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.24 2002/10/06 00:27:25 relson - * Use environment variable BOGOFILTER_DIR to specify the directory for bogofilter's word lists. - * If BOGOFILTER_DIR isn't defined, use HOME instead. - * - * Revision 1.23 2002/10/05 22:13:11 relson - * If environment variables BOGODIR or HOME is defined, use its value for bogofilters - * wordlist directory. If neither is defined, use the current directory. - * - * Revision 1.22 2002/10/04 18:40:17 relson - * If the HOME path already contains 'bogofilter', use it without tacking on BOGODIR. - * - * Revision 1.21 2002/10/04 18:08:25 relson - * Added a '-u' (update) option so that the appropriate wordlist, i.e. spamlist.db - * or goodlist.db, is updated after classifying the message. - * - * Revision 1.20 2002/10/04 04:29:20 relson - * Clean up allocation and deallocation of directory. - * - * Revision 1.19 2002/10/04 03:26:52 gyepi - * bug fix: make sure directory points to heap memory when it is used - * - * Revision 1.18 2002/10/04 01:35:23 m-a - * Free directory if used. - * - * Revision 1.17 2002/10/02 17:14:54 relson - * main.c now calls setup_lists() for initializing the wordlist structures, including the opening of the wordlist.db files. - * setup_list() takes a directory name as its argument and passes it to init_list(), which calls open_wordlist() for the actual open. - * - * Revision 1.16 2002/10/02 16:27:40 relson - * Initial inclusion of multiple wordlist code into bogofilter. - * - * Revision 1.15 2002/09/29 03:40:54 gyepi - * - * Modified: bogofilter.c bogofilter.h main.c - * 1. replace Judy with hash table (wordhash) - * 2. ensure that databases are always locked in the same order. - * - * Apologies for simultaneously submitting loosely related changes. - * - * Revision 1.14 2002/09/26 23:04:40 relson - * documentation: - * changed to refer to "good" and "spam" tokens and lists. - * removed '-l' option as this function is now in bogoutil. - * - * filenames: - * changed database from "hamlist.db" to "goodlist.db". - * - * variables: - * renamed "ham_list" and "hamness" to "good_list" and "goodness". - * - * Revision 1.13 2002/09/25 18:17:09 relson - * Added '-h' option to print help message and exit. - * - * Revision 1.12 2002/09/25 18:15:19 relson - * Renamed '-h' and '-H' options to '-n' and '-N' in main.c. - * Modified documentation to show the new names. - * - * Revision 1.11 2002/09/24 04:34:19 gyepi - * - * - * Modified Files: - * Makefile.am -- add entries for datastore* + and other new files - * bogofilter.c bogofilter.h main.c -- fixup to use database abstraction - * - * Added Files: - * datastore_db.c datastore_db.h datastore.h -- database abstraction. Also implements locking - * xmalloc.c xmalloc.h -- utility - * bogoutil.c -- dump/restore utility. - * - * 1. Implements database abstraction as discussed. - * Also implements multiple readers/single writer file locking. - * - * 2. Adds utility to dump/restore databases. - * - * Revision 1.10 2002/09/23 11:34:30 relson - * Modify passthrough code so that X-Spam-Status line will also print in verbose mode. - * - * Revision 1.9 2002/09/23 11:31:53 m-a - * Unnest comments, and move $ line down by one to prevent CVS from adding nested comments again. - * - * Revision 1.8 2002/09/23 11:27:25 m-a - * Drop unused `inheaders' variable, unnest comments. - * - * Revision 1.7 2002/09/23 10:08:49 m-a - * Integrate patch by Zeph Hull and Clint Adams to present spamicity in - * X-Spam-Status header in bogofilter -p mode. - * - * Revision 1.6 2002/09/20 15:27:27 m-a - * Optimize bogofilter -p: use tighter loop, print our X-Spam-Status: header after - * all other headers, and ensure that there is always an empty line after the - * headers. We have much less checks in the loops, so it should be somewhat - * faster now. - * - * Revision 1.5 2002/09/17 07:19:04 adrian_otto - * Added -V mode for printing out version information. - * - * Revision 1.4 2002/09/16 20:44:13 m-a - * Do not increment passthrough on -p, but set it to 1. - * - * Revision 1.3 2002/09/15 19:07:13 relson - * Add an enumerated type for return codes of RC_SPAM and RC_NONSPAM, which values of 0 and 1 as called for by procmail. - * Use the new codes and type for bogofilter() and when generating the X-Spam-Status message. - * - * Revision 1.2 2002/09/15 16:31:41 relson - * Substitute STDIN_FILENO where numeric constant 0 is used as a file descriptor. - * - * Revision 1.1.1.1 2002/09/14 22:15:20 adrian_otto - * 0.7.3 Base Source - * */ /***************************************************************************** --- 1,3 ---- Index: wordhash.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/wordhash.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wordhash.c 4 Oct 2002 04:43:59 -0000 1.4 --- wordhash.c 6 Oct 2002 01:44:17 -0000 1.5 *************** *** 1,25 **** ! /* $Id$ ! * ! * $Log$ ! * Revision 1.4 2002/10/04 04:43:59 relson ! * Converted header to standard format. ! * ! * Added comment with command for building the standalone wordhash utility. ! * ! * Revision 1.3 2002/10/04 02:48:29 m-a ! * Fix types. ! * ! * Revision 1.2 2002/10/04 02:06:55 gyepi ! * ! * 1. Use multiple buffer lists in wordhash to avoid alignment problems ! * on more restrictive architectures. ! * 2. Add initializer arg to wordhash_insert. ! * ! * Thanks to Clint Adams for helping debug both of these. ! * ! * Revision 1.1 2002/09/29 03:37:56 gyepi ! * replace Judy with hash table (wordhash) ! * ! */ /* --- 1,3 ---- ! /* $Id$ */ /* Index: wordhash.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/wordhash.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wordhash.h 4 Oct 2002 04:01:51 -0000 1.4 --- wordhash.h 6 Oct 2002 01:44:17 -0000 1.5 *************** *** 1,9 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.4 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ #ifndef WORDHASH_H_GUARD --- 1,3 ---- Index: wordlists.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/wordlists.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wordlists.c 5 Oct 2002 22:13:11 -0000 1.7 --- wordlists.c 6 Oct 2002 01:44:17 -0000 1.8 *************** *** 1,30 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.7 2002/10/05 22:13:11 relson - * If environment variables BOGODIR or HOME is defined, use its value for bogofilters - * wordlist directory. If neither is defined, use the current directory. - * - * Revision 1.6 2002/10/04 11:58:46 relson - * Removed obsolete "file" field from wordlist_t. - * Cleaned up list name, directory, and filename code in open_wordlist(). - * Changed parameters to "const char *" for open_wordlist(), dbh_init(), and db_open(). - * - * Revision 1.5 2002/10/04 04:34:11 relson - * Changed "char *" parameters of setup_lists() and init_lists() to "const char *". - * - * Revision 1.4 2002/10/04 01:42:36 m-a - * Cleanup, fixing memory leaks, adding error checking. TODO: let callers (main.c) also check for error return. - * - * Revision 1.3 2002/10/04 01:35:07 gyepi - * Integration of wordlists with datastore and bogofilter code. - * David Relson did most of the work. I just tweaked the locking code - * and made a few minor changes. - * - * Revision 1.2 2002/10/02 17:14:54 relson - * main.c now calls setup_lists() for initializing the wordlist structures, including the opening of the wordlist.db files. - * setup_list() takes a directory name as its argument and passes it to init_list(), which calls open_wordlist() for the actual open. - * - * */ #include <stdio.h> --- 1,3 ---- Index: wordlists.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/wordlists.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wordlists.h 5 Oct 2002 22:13:12 -0000 1.8 --- wordlists.h 6 Oct 2002 01:44:17 -0000 1.9 *************** *** 1,33 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.8 2002/10/05 22:13:12 relson - * If environment variables BOGODIR or HOME is defined, use its value for bogofilters - * wordlist directory. If neither is defined, use the current directory. - * - * Revision 1.7 2002/10/04 11:58:46 relson - * Removed obsolete "file" field from wordlist_t. - * Cleaned up list name, directory, and filename code in open_wordlist(). - * Changed parameters to "const char *" for open_wordlist(), dbh_init(), and db_open(). - * - * Revision 1.6 2002/10/04 04:34:11 relson - * Changed "char *" parameters of setup_lists() and init_lists() to "const char *". - * - * Revision 1.5 2002/10/04 01:42:36 m-a - * Cleanup, fixing memory leaks, adding error checking. TODO: let callers (main.c) also check for error return. - * - * Revision 1.4 2002/10/04 01:35:06 gyepi - * Integration of wordlists with datastore and bogofilter code. - * David Relson did most of the work. I just tweaked the locking code - * and made a few minor changes. - * - * Revision 1.3 2002/10/04 00:39:57 m-a - * First set of type fixes. - * - * Revision 1.2 2002/10/02 17:14:54 relson - * main.c now calls setup_lists() for initializing the wordlist structures, including the opening of the wordlist.db files. - * setup_list() takes a directory name as its argument and passes it to init_list(), which calls open_wordlist() for the actual open. - * - * */ /* constants and declarations for wordlists */ --- 1,3 ---- Index: xmalloc.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/xmalloc.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xmalloc.c 4 Oct 2002 04:01:51 -0000 1.3 --- xmalloc.c 6 Oct 2002 01:44:17 -0000 1.4 *************** *** 1,9 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.3 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ /* --- 1,3 ---- Index: xmalloc.h =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/xmalloc.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** xmalloc.h 4 Oct 2002 04:01:51 -0000 1.3 --- xmalloc.h 6 Oct 2002 01:44:17 -0000 1.4 *************** *** 1,9 **** /* $Id$ */ - /* - * $Log$ - * Revision 1.3 2002/10/04 04:01:51 relson - * Added cvs keywords Id and Log to the files' headers. - * - */ #ifndef XMALLOC_H_GUARD --- 1,3 ---- |