bogotune-0.2.3 released
Greg Louis
glouis at dynamicro.on.ca
Sat Jun 21 14:42:50 CEST 2003
The "bogol" helper script in bogotune-0.2.2 (released with bogofilter
0.13.7) doesn't accept options to be passed to bogolexer. For people
who use configuration files to set lexer options, this is a bug. The
fix may be downloaded with
http://www.bgl.nu/bogofilter/bogotune-0.2.3.tgz
which has no other differences from bogotune-0.2.2, so if you don't use
configuration files, there's no need to upgrade.
The patch is fairly small, so here it is:
diff -urN bogotune-0.2.2/HISTORY bogotune-0.2.3/HISTORY
--- bogotune-0.2.2/HISTORY 2003-06-20 06:48:19.000000000 -0400
+++ bogotune-0.2.3/HISTORY 2003-06-21 08:09:01.000000000 -0400
@@ -1,3 +1,5 @@
+2003-06-21 Version 0.2.3 started: Option support for bogolexer added to
+ bogol
2003-06-20 Version 0.2.2 released for incorporation into bogofilter.
2003-06-20 Minor change to default work directory name.
2003-06-19 Version 0.2.2 development started; README updated.
diff -urN bogotune-0.2.2/bogol bogotune-0.2.3/bogol
--- bogotune-0.2.2/bogol 2003-06-10 09:28:17.000000000 -0400
+++ bogotune-0.2.3/bogol 2003-06-21 08:40:33.000000000 -0400
@@ -5,7 +5,7 @@
NAME
bogol - lexical analysis and database lookup for an email message
SYNOPSIS
- bogol [-h | path/to/bogofilter/directory]
+ bogol [-h | path/to/bogofilter/directory [bogolexer options]]
DESCRIPTION
bogol creates a message digest consisting of a .MSG_COUNT line,
followed by one line per token. The format is
@@ -24,14 +24,16 @@
-h The option -h displays help.
BOGOFILTER DIRECTORY
The bogofilter directory is where the wordlists are kept. It defaults
- to ~/.bogofilter if no path is provided on the command line.
+ to ~/.bogofilter if no path is provided on the command line. The
+ path must be provided if further options are given; any further
+ options are passed through to bogolexer.
SEE ALSO
bogofilter(1), bogolexer(1), bogoutil(1), apclass(1).
EOT
exit 0
fi
db=~/.bogofilter
-test "x$1" = "x" || db=$1
-( echo .MSG_COUNT; bogolexer -p | sort -u) | \
+if [ "x$1" != "x" ]; then db=$1; shift; fi
+( echo .MSG_COUNT; bogolexer -p $* | sort -u ) | \
bogoutil -w $db | \
awk 'NF == 3 {printf("\"%s\" %s %s\n", $1, $2, $3)}'
diff -urN bogotune-0.2.2/bogol.1 bogotune-0.2.3/bogol.1
--- bogotune-0.2.2/bogol.1 2003-06-10 15:35:20.000000000 -0400
+++ bogotune-0.2.3/bogol.1 2003-06-21 08:25:35.000000000 -0400
@@ -1,5 +1,5 @@
." Text automatically generated by txt2man-1.4.7
-.TH bogol 1 "June 10, 2003" "" ""
+.TH bogol 1 "June 21, 2003" "" ""
.SH NAME
\fBbogol \fP- lexical analysis and database lookup for an email message
.SH SYNOPSIS
diff -urN bogotune-0.2.2/bogotune bogotune-0.2.3/bogotune
--- bogotune-0.2.2/bogotune 2003-06-20 08:34:26.000000000 -0400
+++ bogotune-0.2.3/bogotune 2003-06-21 08:40:03.000000000 -0400
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# bogotune - a bogofilter tuning tool
-# 20030619, version 0.2.2
+# 20030621, version 0.2.3
# Copyright (c) 2003 Gregory Louis; distributed wiithout warranty of
# any kind under the GNU General Public License (GPL).
@@ -154,10 +154,10 @@
print("Test files are in mbox format, creating message-count files...\n");
$spwork = $workfn . ".sp"; $nswork = $workfn . ".ns";
$cmd = join(" ", "cat", @spfiles, "| formail -s bogol", $bogodir,
- ">", $spwork);
+ $cf, ">", $spwork);
system($cmd) == 0 or yuk(7, "Problem processing spam files");
$cmd = join(" ", "cat", @nsfiles, "| formail -s bogol", $bogodir,
- ">", $nswork);
+ $cf, ">", $nswork);
system($cmd) == 0 or yuk(7, "Problem processing nonspam files");
@spfiles = $spwork; @nsfiles = $nswork;
print("Message-count files ", $workfn, ".{sp,ns} created\n");
--
| G r e g L o u i s | gpg public key: finger |
| http://www.bgl.nu/~glouis | glouis at consultronics.com |
| http://wecanstopspam.org in signatures fights junk email |
More information about the Bogofilter
mailing list