Count Patch [was: possible message count corruption]
Jeremy Blosser
jblosser-bogofilter at firinn.org
Fri Sep 20 19:44:22 CEST 2002
On Sep 20, David Relson [relson at osagesoftware.com] wrote:
> Jeremy,
>
> Attached is a patch that makes the *.count files obsolete by adding
> ".count" as a word in the wordlist database. Since words (tokens) in the
> databases must start with a letter or a dollar sign, ".count" will never
> conflict and is available for this purpose.
>
> With the patch, the getcount() function first asks the database for
> ".count". If it's present, fine. If it isn't present, the list.count file
> is read and ".count" is output to the database. At the end of adding
> messages to the databases, the count is output to the db.
>
> Give it a try and let me know if it fixes your problem.
Nope. 10 minutes after switching to a patched version:
% grep ' messages on the spam' bogofilter-log|grep -C ' 1 messages'
bogofilter: 1 messages on the spam list
bogofilter: 2 messages on the spam list
bogofilter: 3 messages on the spam list
--
bogofilter: 158 messages on the spam list
bogofilter: 159 messages on the spam list
bogofilter: 1 messages on the spam list
bogofilter: 160 messages on the spam list
bogofilter: 1 messages on the spam list
bogofilter: 2 messages on the spam list
bogofilter: 3 messages on the spam list
More information about the bogofilter-dev
mailing list