Bogofilter is a trainable email spam detector.
Bogofilter takes an email message or other text on standard input, parses it
into words, does a statistical check against databases of "good" and "bad"
words, and returns a status code indicating whether or not the message is spam.
Bogofilter decodes base64 or quoted-printable encoded texts and ignores non-text
attachments and HTML comments.
The supported database backends are LMDB, Kyoto Cabinet and SQLite3.
The upstream version would theoretically also support QDBM and
Tokyo Cabinet, but these are not currently available as FreeBSD ports.
Berkeley DB support is being phased out.
===> The following configuration options are available for bogofilter-lmdb1-1.3.0.r1_1:
DOCS=on: Build and/or install documentation
GSL=on: Link with system-wide GSL dynamically (recommended)
UNICODE=on: Normalize tokens to Unicode (UTF-8) (recommended)
===> Use 'make config' to modify these settings
mail/bogofilter*: fix unaligned access on some databases
This was found with the undefined behavior sanitizer,
and affects the generic code (independent of the concrete database
back-end in use) so we need to bump all PORTREVISIONS.
The bug was that internal code was casting a void * to a uint32_t *
without ensuring alignment of the source value.
Let's use memcpy to a statically-sized array and let the optimizer
handle it for us. Adds files/patch-src_datastore.c.
PR: 297024
MFH: 2026Q3
mail/bogofilter*: Prepare LMDB 1.0 transition
Here's what we do now:
- mail/bogofilter currently depends on lmdb0, a 0.9.X port, so
it continues to work as before
- add a new mail/bogofilter-lmdb1 port that depends on lmdb, the 1.0
version of the LMDB database.
- add the upstream patch for bogofilter 1.3.0.rc1 that I made and
that delphij@ prepared for integration into the ports tree - thanks!
Here's the plan for end of 2026:
- AT THE SAME TIME:
- upgrade mail/bogofilter to depend on LMDB 1.0
- portrm mail/bogofilter-lmdb1
- add a MOVED entry to redirect from bogofilter-lmdb1 to bogofilter.
While here, clean up and rearrange the Makefiles.
PR: 296519
Reviewed by: arrowd
Pull Request: https://github.com/freebsd/freebsd-ports/pull/551