'\" t .\" Title: bogoupgrade .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 05/19/2019 .\" Manual: Bogofilter Reference Manual .\" Source: Bogofilter .\" Language: English .\" .TH "BOGOUPGRADE" "1" "05/19/2019" "Bogofilter" "Bogofilter Reference Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" bogoupgrade \- upgrades bogofilter database to current version .SH "SYNOPSIS" .HP \w'\fBbogoupgrade\fR\ 'u \fBbogoupgrade\fR [\-h] \-d\ \fIdirectory\fR [\-i\ \fIinput\ file\fR] [\-o\ \fIoutput\ file\fR] [\-b\ \fIpath\ to\ bogoutil\fR] .SH "DESCRIPTION" .PP \fBbogoupgrade\fR is a command to upgrade bogofilter\*(Aqs databases from an old format to the current format\&. Since the format of the database changes once in a while, the utility is designed to make the upgrade easy\&. .SH "OPTIONS" .PP The \fB\-h\fR option prints the help message and exits\&. .PP The \fB\-d\fR specifies the directory with the wordlists for converting\&. This option is used when converting from multiple, separate wordlists (spamlist\&.db and goodlist\&.db \- containing spam and ham tokens, respectively) to a combined wordlist (wordlist\&.db) which contains both spam and ham tokens\&. .PP The \fB\-i\fR specifies the input file to be converted\&. It should be a text file containing message counts, and possibly data\&. If there is no data in the text file, there should be a Berkeley DB file in the same directory as the text file which contains the data\&. .PP The \fB\-o\fR specifies the output Berkeley DB file\&. .PP The \fB\-b\fR gives the path to the \fBbogoutil\fR command\&. It defaults to \*(Aqbogoutil\*(Aq, in the hopes that your shell will find it\&. .SH "UPGRADING" .PP Follow these instructions to upgrade bogofilter\*(Aqs databases to the latest version\&. .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Stop all instances of bogofilter\&. While the upgrade tools lock the database files, the upgrade may take a long time if you have a busy site\&. Don\*(Aqt forget to stop cron jobs or daemons that fetch and process mail and could fire off bogofilter\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} Backup your data\&. Let\*(Aqs assume that you said: .sp .if n \{\ .RS 4 .\} .nf $ \fBmv ~/\&.bogofilter ~/\&.bogofilter\&.safe\fR $ \fBmkdir ~/\&.bogofilter\fR .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} If your bogofilter version is less than 0\&.7, say: .sp .if n \{\ .RS 4 .\} .nf $ \fBbogoupgrade \-i ~/\&.bogofilter\&.safe/goodlist \-o ~/\&.bogofilter/goodlist\&.db\fR $ \fBbogoupgrade \-i ~/\&.bogofilter\&.safe/badlist \-o ~/\&.bogofilter/spamlist\&.db\fR .fi .if n \{\ .RE .\} .sp If your bogofilter version is 0\&.7 or greater, say: .sp .if n \{\ .RS 4 .\} .nf $ \fBbogoupgrade \-i ~/\&.bogofilter\&.safe/hamlist\&.count \-o ~/\&.bogofilter/goodlist\&.db\fR $ \fBbogoupgrade \-i ~/\&.bogofilter\&.safe/spamlist\&.count \-o ~/\&.bogofilter/spamlist\&.db\fR .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 4.\h'+01'\c .\} .el \{\ .sp -1 .IP " 4." 4.2 .\} Current versions of bogofilter use a combined wordlist that holds both spam and non\-spam tokens\&. It is named wordlist\&.db\&. If you\*(Aqre updating from a version older than 0\&.14\&.0 that has separate wordlists (named goodlist\&.db and spamlist\&.db), use: .sp .if n \{\ .RS 4 .\} .nf $ \fBbogoupgrade \-d ~/\&.bogofilter\&.safe\fR .fi .if n \{\ .RE .\} .RE .sp .RS 4 .ie n \{\ \h'-04' 5.\h'+01'\c .\} .el \{\ .sp -1 .IP " 5." 4.2 .\} Done\&. Restart any stopped daemons, cron tasks, etc\&. .RE .SH "AUTHOR" .PP \fBbogoupgrade\fR was written by Gyepi Sam and David Relson \&. .PP For updates, see \m[blue]\fBthe bogofilter project page\fR\m[]\&\s-2\u[1]\d\s+2\&. .SH "SEE ALSO" .PP bogofilter(1), bogolexer(1), bogotune(1), bogoutil(1) .SH "NOTES" .IP " 1." 4 the bogofilter project page .RS 4 \%http://bogofilter.sourceforge.net/ .RE