bmf, branch HEAD
bmf (Bayesian Mail Filter) 0.9.4 fork + patches
9372645e9887679999d441e106da7bbc572fb2a6
2020-02-04T22:03:43Z
2020-02-04T22:03:43Z
update TODO
Hiltjo Posthuma
hiltjo@codemadness.org
commit 9372645e9887679999d441e106da7bbc572fb2a6
parent 8a316864887a48a5fd2867b6bde5d5e3b215e288
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 4 Feb 2020 23:03:43 +0100
update TODO
8a316864887a48a5fd2867b6bde5d5e3b215e288
2020-02-04T21:59:04Z
2020-02-04T21:59:04Z
add a bulk test mode option (-b)
Hiltjo Posthuma
hiltjo@codemadness.org
commit 8a316864887a48a5fd2867b6bde5d5e3b215e288
parent da5b33ffd35e25649614ac678df293afcffb3f35
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 4 Feb 2020 22:59:04 +0100
add a bulk test mode option (-b)
Much more efficient for my use-case: bulk testing directory full of maildir
files quickly.
find "$d/new" -type f | bmf -b | awk -F '\t' '$2 > 0.9 { print $1; }' | while read -r f; do
...move ugly spam here...
done
da5b33ffd35e25649614ac678df293afcffb3f35
2019-01-26T19:10:33Z
2019-01-26T19:10:33Z
README: typo applicatios -> applications
Hiltjo Posthuma
hiltjo@codemadness.org
commit da5b33ffd35e25649614ac678df293afcffb3f35
parent 2d06b1eeab72bd1e4715d9191ca2b03cd0ab50de
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 26 Jan 2019 20:10:33 +0100
README: typo applicatios -> applications
+ windows will not be officially supported.
2d06b1eeab72bd1e4715d9191ca2b03cd0ab50de
2019-01-26T18:39:52Z
2019-01-26T18:55:00Z
fix -d parameter
Julian Schweinsberg
pazz0@0xfa.de
commit 2d06b1eeab72bd1e4715d9191ca2b03cd0ab50de
parent 40a406768615f5b89a6ba6e802fed5597c769c1a
Author: Julian Schweinsberg <pazz0@0xfa.de>
Date: Sat, 26 Jan 2019 19:39:52 +0100
fix -d parameter
free(dbname) caused a crash, because dbname is initialized with a string constant
40a406768615f5b89a6ba6e802fed5597c769c1a
2018-11-09T10:18:48Z
2018-11-09T10:18:48Z
fix statdump call parameter
Hiltjo Posthuma
hiltjo@codemadness.org
commit 40a406768615f5b89a6ba6e802fed5597c769c1a
parent 21257a01a467925aaf99a6dbb0b7604a58762473
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 9 Nov 2018 11:18:48 +0100
fix statdump call parameter
21257a01a467925aaf99a6dbb0b7604a58762473
2018-11-09T10:17:26Z
2018-11-09T10:17:26Z
fix statdump declaration
Hiltjo Posthuma
hiltjo@codemadness.org
commit 21257a01a467925aaf99a6dbb0b7604a58762473
parent e39d60975a228c3d1e5b9512e082fb8bb1c28001
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 9 Nov 2018 11:17:26 +0100
fix statdump declaration
also noticed by Christoph Polcin, thanks!
e39d60975a228c3d1e5b9512e082fb8bb1c28001
2018-11-08T17:12:36Z
2018-11-08T17:12:36Z
statdump: use standard I/O functions for buffering
Hiltjo Posthuma
hiltjo@codemadness.org
commit e39d60975a228c3d1e5b9512e082fb8bb1c28001
parent 24fa4a0c3c143c6f36f1ca08b41135156c68f9ff
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 8 Nov 2018 18:12:36 +0100
statdump: use standard I/O functions for buffering
+ fix undefined behaviour with tolower() and ugly sprintf() buffering.
24fa4a0c3c143c6f36f1ca08b41135156c68f9ff
2018-11-08T17:07:02Z
2018-11-08T17:07:02Z
fix uninitialized memory when parsing bogofilter header
Hiltjo Posthuma
hiltjo@codemadness.org
commit 24fa4a0c3c143c6f36f1ca08b41135156c68f9ff
parent b627d86afb6118bb029d5601078fe972d576ab3e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 8 Nov 2018 18:07:02 +0100
fix uninitialized memory when parsing bogofilter header
the memory was not guaranteed to be NUL terminated
b627d86afb6118bb029d5601078fe972d576ab3e
2018-10-27T18:05:38Z
2018-10-27T18:05:38Z
function declaration: use the same parameter names
Hiltjo Posthuma
hiltjo@codemadness.org
commit b627d86afb6118bb029d5601078fe972d576ab3e
parent 57c341a511e88733eedf95a443567f27198247e3
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Oct 2018 20:05:38 +0200
function declaration: use the same parameter names
57c341a511e88733eedf95a443567f27198247e3
2018-10-27T18:02:06Z
2018-10-27T18:02:06Z
set rdonly earlier for unveil, make open() error more clear
Hiltjo Posthuma
hiltjo@codemadness.org
commit 57c341a511e88733eedf95a443567f27198247e3
parent da144ef21a75e5a1f78c1faf2d76d93c68f6180f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Oct 2018 20:02:06 +0200
set rdonly earlier for unveil, make open() error more clear
da144ef21a75e5a1f78c1faf2d76d93c68f6180f
2018-10-27T17:56:26Z
2018-10-27T17:56:26Z
fix unveil(2) permissions and path name + misc code fixes
Hiltjo Posthuma
hiltjo@codemadness.org
commit da144ef21a75e5a1f78c1faf2d76d93c68f6180f
parent 8c0e2cad22ac8e72666e90b8069cb0b082e38429
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Oct 2018 19:56:26 +0200
fix unveil(2) permissions and path name + misc code fixes
- check strdup call
- remove dbh_t abstraction
- remove unneccesary casts.
8c0e2cad22ac8e72666e90b8069cb0b082e38429
2018-10-27T17:33:42Z
2018-10-27T17:33:42Z
dbh_open -> dbtext_db_open
Hiltjo Posthuma
hiltjo@codemadness.org
commit 8c0e2cad22ac8e72666e90b8069cb0b082e38429
parent 60b437c6d0bc19fc9f67ca8cfaf6cbfc50d47423
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Oct 2018 19:33:42 +0200
dbh_open -> dbtext_db_open
60b437c6d0bc19fc9f67ca8cfaf6cbfc50d47423
2018-10-27T17:31:30Z
2018-10-27T17:31:30Z
merge dbh and dbtext (WIP)
Hiltjo Posthuma
hiltjo@codemadness.org
commit 60b437c6d0bc19fc9f67ca8cfaf6cbfc50d47423
parent 4c3c79f49125ef555fba1df7f6cbab2c7b26ea00
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Oct 2018 19:31:30 +0200
merge dbh and dbtext (WIP)
4c3c79f49125ef555fba1df7f6cbab2c7b26ea00
2018-10-27T17:14:50Z
2018-10-27T17:14:50Z
initial unveil(2) support + some code-cleanup and remove unused functions
Hiltjo Posthuma
hiltjo@codemadness.org
commit 4c3c79f49125ef555fba1df7f6cbab2c7b26ea00
parent ea2535f01b1fb73863f7104b0e21719b577620c1
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Oct 2018 19:14:50 +0200
initial unveil(2) support + some code-cleanup and remove unused functions
ea2535f01b1fb73863f7104b0e21719b577620c1
2018-10-27T17:13:02Z
2018-10-27T17:13:02Z
whoops, fix regression in opening "database"
Hiltjo Posthuma
hiltjo@codemadness.org
commit ea2535f01b1fb73863f7104b0e21719b577620c1
parent f5e56cc70c117352ec5b7a7984065eaa65db162f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Oct 2018 19:13:02 +0200
whoops, fix regression in opening "database"
f5e56cc70c117352ec5b7a7984065eaa65db162f
2018-10-27T16:37:01Z
2018-10-27T16:37:01Z
many improvements
Hiltjo Posthuma
hiltjo@codemadness.org
commit f5e56cc70c117352ec5b7a7984065eaa65db162f
parent 20a0f52d5b478e240450fd72fa3bbd3ab5c58c48
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 27 Oct 2018 18:37:01 +0200
many improvements
- update README: only flat files are supported now.
- remove bmf.spec.in file.
- remove unused functions.
- remove some assert() calls.
- dbtext_db_open() improvements:
- check strdup call + perror message.
- malloc + perror message.
- check for empty directory string (just in case).
- use snprintf (just in case).
- free memory on failure condition.
- dbtext_db_opentable() improvements:
- use snprintf, error on path truncation.
- remove unit tests (not maintained).
- code-style improvements.
20a0f52d5b478e240450fd72fa3bbd3ab5c58c48
2018-10-25T10:41:39Z
2018-10-25T10:41:39Z
fix some undefined behaviour with ctype functions
Hiltjo Posthuma
hiltjo@codemadness.org
commit 20a0f52d5b478e240450fd72fa3bbd3ab5c58c48
parent f368a24da9457e4d269ca281bbc07f0eef08751e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 25 Oct 2018 12:41:39 +0200
fix some undefined behaviour with ctype functions
f368a24da9457e4d269ca281bbc07f0eef08751e
2018-09-29T11:15:26Z
2018-09-29T11:15:26Z
improve Makefile
Hiltjo Posthuma
hiltjo@codemadness.org
commit f368a24da9457e4d269ca281bbc07f0eef08751e
parent 486c23d144116c1794e3800c0c0e051b2f3469e3
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 29 Sep 2018 13:15:26 +0200
improve Makefile
486c23d144116c1794e3800c0c0e051b2f3469e3
2018-09-29T11:14:03Z
2018-09-29T11:14:03Z
define PACKAGE macro in C file
Hiltjo Posthuma
hiltjo@codemadness.org
commit 486c23d144116c1794e3800c0c0e051b2f3469e3
parent ed1d073e8b0ab5ad0745d7d9a75ee978b460659a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 29 Sep 2018 13:14:03 +0200
define PACKAGE macro in C file
ed1d073e8b0ab5ad0745d7d9a75ee978b460659a
2018-09-29T10:52:58Z
2018-09-29T10:52:58Z
remove unused code, leftover -f flag documentation
Hiltjo Posthuma
hiltjo@codemadness.org
commit ed1d073e8b0ab5ad0745d7d9a75ee978b460659a
parent 8c2b855490c62d2b8f20a0dcbb85ed1dc7686155
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 29 Sep 2018 12:52:58 +0200
remove unused code, leftover -f flag documentation
8c2b855490c62d2b8f20a0dcbb85ed1dc7686155
2018-09-29T10:49:39Z
2018-09-29T10:49:39Z
dbg: simplify verbose function
Hiltjo Posthuma
hiltjo@codemadness.org
commit 8c2b855490c62d2b8f20a0dcbb85ed1dc7686155
parent 1e2885e37b75f738445d13b6a61caf9786b28fea
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 29 Sep 2018 12:49:39 +0200
dbg: simplify verbose function
1e2885e37b75f738445d13b6a61caf9786b28fea
2018-09-23T12:39:59Z
2018-09-23T12:39:59Z
config.h: disable pledge for non-OpenBSD
Hiltjo Posthuma
hiltjo@codemadness.org
commit 1e2885e37b75f738445d13b6a61caf9786b28fea
parent c8fb28f55c568c95be709803ef153199f1557035
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 23 Sep 2018 14:39:59 +0200
config.h: disable pledge for non-OpenBSD
c8fb28f55c568c95be709803ef153199f1557035
2018-09-23T12:37:04Z
2018-09-23T12:37:04Z
Makefile: order dependencies, remove unneeded [ -d ] check
Hiltjo Posthuma
hiltjo@codemadness.org
commit c8fb28f55c568c95be709803ef153199f1557035
parent 0f11e5e148314939e59850ef2aaa607f2b06bc90
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 23 Sep 2018 14:37:04 +0200
Makefile: order dependencies, remove unneeded [ -d ] check
0f11e5e148314939e59850ef2aaa607f2b06bc90
2018-09-23T12:36:58Z
2018-09-23T12:36:58Z
improve code-style
Hiltjo Posthuma
hiltjo@codemadness.org
commit 0f11e5e148314939e59850ef2aaa607f2b06bc90
parent cd31f403d6c7b3acf4a41365c063c4cefef34e83
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 23 Sep 2018 14:36:58 +0200
improve code-style
cd31f403d6c7b3acf4a41365c063c4cefef34e83
2018-09-23T12:29:09Z
2018-09-23T12:29:09Z
bmf.c: improve some code-style
Hiltjo Posthuma
hiltjo@codemadness.org
commit cd31f403d6c7b3acf4a41365c063c4cefef34e83
parent d4c3810c7f1e6030166288e0e30224c17dfd5ba5
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 23 Sep 2018 14:29:09 +0200
bmf.c: improve some code-style
d4c3810c7f1e6030166288e0e30224c17dfd5ba5
2018-09-23T12:19:58Z
2018-09-23T12:19:58Z
update TODO
Hiltjo Posthuma
hiltjo@codemadness.org
commit d4c3810c7f1e6030166288e0e30224c17dfd5ba5
parent 79f641da0818fd7a43a970ad425e16300f4e6572
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 23 Sep 2018 14:19:58 +0200
update TODO
79f641da0818fd7a43a970ad425e16300f4e6572
2018-09-22T18:05:26Z
2018-09-22T18:05:26Z
remove -i and -f from usage
Hiltjo Posthuma
hiltjo@codemadness.org
commit 79f641da0818fd7a43a970ad425e16300f4e6572
parent 46b7439476354ab85b37689f5bec97b0231b251a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 20:05:26 +0200
remove -i and -f from usage
46b7439476354ab85b37689f5bec97b0231b251a
2018-09-22T16:51:01Z
2018-09-22T16:51:01Z
Makefile: install in /usr/local
Hiltjo Posthuma
hiltjo@codemadness.org
commit 46b7439476354ab85b37689f5bec97b0231b251a
parent 41e1e6b8e9d49a1300c070f03070db4ce2d0bbbd
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 18:51:01 +0200
Makefile: install in /usr/local
41e1e6b8e9d49a1300c070f03070db4ce2d0bbbd
2018-09-22T16:49:54Z
2018-09-22T16:49:54Z
pledge test mode, no need to reopen goodlist and spamlist for each message in test mode
Hiltjo Posthuma
hiltjo@codemadness.org
commit 41e1e6b8e9d49a1300c070f03070db4ce2d0bbbd
parent bd5dd52e982fcb2c07eddb303e585a6e9b738508
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 18:49:54 +0200
pledge test mode, no need to reopen goodlist and spamlist for each message in test mode
bd5dd52e982fcb2c07eddb303e585a6e9b738508
2018-09-22T16:27:17Z
2018-09-22T16:27:17Z
tweak pledge
Hiltjo Posthuma
hiltjo@codemadness.org
commit bd5dd52e982fcb2c07eddb303e585a6e9b738508
parent 30cf7b5fcb8028582d3c746e9c72289be77c3f87
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 18:27:17 +0200
tweak pledge
30cf7b5fcb8028582d3c746e9c72289be77c3f87
2018-09-22T16:27:09Z
2018-09-22T16:27:09Z
remove code leftover from -i option
Hiltjo Posthuma
hiltjo@codemadness.org
commit 30cf7b5fcb8028582d3c746e9c72289be77c3f87
parent 13b02490de8ddfe9a9ad66cc2484f7fd3a3b9278
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 18:27:09 +0200
remove code leftover from -i option
13b02490de8ddfe9a9ad66cc2484f7fd3a3b9278
2018-09-22T16:12:00Z
2018-09-22T16:12:00Z
remove NDEBUG code
Hiltjo Posthuma
hiltjo@codemadness.org
commit 13b02490de8ddfe9a9ad66cc2484f7fd3a3b9278
parent 107ae911553ca8a5885eecaa2da0c37e030c216d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 18:12:00 +0200
remove NDEBUG code
107ae911553ca8a5885eecaa2da0c37e030c216d
2018-09-22T16:05:42Z
2018-09-22T16:05:42Z
small cleanup, remove DB_USER, DB_PASS
Hiltjo Posthuma
hiltjo@codemadness.org
commit 107ae911553ca8a5885eecaa2da0c37e030c216d
parent e805a804b42a190f0b06d8c495fd0f29011b1329
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 18:05:42 +0200
small cleanup, remove DB_USER, DB_PASS
e805a804b42a190f0b06d8c495fd0f29011b1329
2018-09-22T15:57:54Z
2018-09-22T15:57:54Z
changes
Hiltjo Posthuma
hiltjo@codemadness.org
commit e805a804b42a190f0b06d8c495fd0f29011b1329
parent 4857ceba2cfedeafd8971a8e6e3db4ce2ea7f1b6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 17:57:54 +0200
changes
- remove -i option: reading from file.
- remove -f format option and db formats.
- initial pledge(2) support.
- remove bmfconv. only text "database" is supported.
4857ceba2cfedeafd8971a8e6e3db4ce2ea7f1b6
2018-09-22T15:49:15Z
2018-09-22T15:49:15Z
add patches from OpenBSD port
Hiltjo Posthuma
hiltjo@codemadness.org
commit 4857ceba2cfedeafd8971a8e6e3db4ce2ea7f1b6
parent 0983b0f64c3e1bf7fa03f2a4060e6f25e9e79cef
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 17:49:15 +0200
add patches from OpenBSD port
0983b0f64c3e1bf7fa03f2a4060e6f25e9e79cef
2018-09-22T15:46:14Z
2018-09-22T15:46:14Z
import bmf 0.9.4
Hiltjo Posthuma
hiltjo@codemadness.org
commit 0983b0f64c3e1bf7fa03f2a4060e6f25e9e79cef
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 22 Sep 2018 17:46:14 +0200
import bmf 0.9.4