BSD Ports

mail/bmf 0.9.4_2,1 FreeBSD

Fast Bayesian Mail Filter compatible with maildrop and procmail

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
GPLv2
Categories
mail
Package size
31.9 KiB, 81.8 KiB installed

Description

bmf is an extremely efficient Bayesian mail filter based on Paul Graham's article, "A Plan for Spam." It's fast, small, efficient, and more versatile than other Bayesian filters.

In the other systems

SystemPortVersion
FreeBSDmail/bmf0.9.4_2,1
OpenBSDmail/bmf0.9.4p12
NetBSDmail/bmf0.9.4
DragonFlymail/bmf0.9.4_2,1

Install

Binary package:

pkg install bmf

From the ports tree:

cd /usr/ports/mail/bmf/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	bmf>0:mail/bmf

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.9.4_2,10.9.4_2,10.9.4,10.9.4_2,1-
FreeBSD:14:quarterly0.9.4_2,10.9.4_2,1n/a0.9.4_2,1-
FreeBSD:15:latest0.9.4_2,10.9.4_2,1n/a0.9.4_2,10.9.4_2,1
FreeBSD:15:quarterly0.9.4_2,10.9.4_2,1n/an/an/a
FreeBSD:16:latest0.9.4_2,10.9.4_2,1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

The Makefile names none itself; they come from USES and USE_*.

The full lists below include those, and their dependencies in turn.

Build dependencies 13
Run dependencies 13

No port depends on this one.

Configuration

Options name: mail_bmf

OptionDefaultDescription
DEBUGoffBuild with debugging support
DOCSoffBuild and/or install documentation
MANPAGESonBuild and/or install manual pages
USES
mysql
Service scripts
none

Message after installing

=== How to integrate bmf ===

For maildrop(1), use only one of the following examples.  The first
sample invokes bmf in its normal mode of operation and the second
invokes bmf as a filter:

	### Sample One
	# Invoke bmf and use return code to filter spam in one step
	exception {
		`bmf`
		if ( $RETURNCODE == 0 )
			to $MAILDIR/spam
	}

	### Sample Two
	# Invoke bmf as a filter
	exception {
		xfilter "bmf -p"
		if (/^X-Spam-Status: Yes/)
			to $MAILDIR/spam
	}


For procmail(1), use only one of the following samples.  SPAM will be
filtered into $MAILDIR/spam.  The first sample invokes bmf in its
normal mode of operation and the second invokes bmf as a filter.

	### begin sample one ###
	# Invoke bmf and use return code to filter spam in one step
	:0HB
	* ? bmf
	| formail -A"X-Spam-Status: Yes, tests=bmf" >>$MAILDIR/spam

	### begin sample two ###
	# Invoke bmf as a filter
	:0 fw
	| bmf -p

	# Filter spam
	:0:
	^X-Spam-Status: Yes
	$MAILDIR/spam

If you put bmf in your maildrop or procmail scripts as suggested
above, it will always register an email as either spam or non-spam.
To reverse this registration and train bmf, the following mutt macros
may be useful:

  macro index \ed "<enter-command>unset wait_key\n<pipe-entry>bmf -S\n<enter-command>set wait_key\n<save-message>=spam\n" "Tags a given message as SPAM"
  macro index \et "<pipe-entry>bmf -t\n<enter-command>set wait_key\n" "Tests a given message to see if it is SPAM"
  macro index \eu "<pipe-entry>bmf -N\n<enter-command>set wait_key\n<save-message>=inbox\n" "Untags a given message as SPAM"

These will override these commands:

  <Esc>d = de-register as non-spam, register as spam, and move to spam folder.
  <Esc>t = test for spamicity.
  <Esc>u = de-register as spam, register as non-spam, and move to inbox folder.

Please see the /usr/local/share/bmf/README for further details.

===>   NOTICE:

The bmf port currently does not have a maintainer. As a result, it is
more likely to have unresolved issues, not be up-to-date, or even be removed in
the future. To volunteer to maintain this port, please create an issue at:

https://bugs.freebsd.org/bugzilla

More information about port maintainership is available at:

https://docs.freebsd.org/en/articles/contributing/#ports-contributing

Files

Manual pages 2
  • bmf(1)
  • bmfconv(1)
pkg-plist 5
  • bin/bmf
  • bin/bmfconv
  • share/man/man1/bmf.1.gz
  • share/man/man1/bmfconv.1.gz
  • share/doc/bmf/README
distinfo 1
FileSizeSHA256
bmf-0.9.4.tar.gz367407eed21802f95df2321ac4c958f99e14d2809852a5708700b633e1abb032c9ce1
Master sites 1
  • SF

Commit history 0

No commits in the history this site was built from.