- remove OpenBSD-bmf-mini-howto.html (redundant with README) and add a
.gnus sample configuration in README; - while there, remove "" from the COMMENT line. from Jim Razmus (maintainer); gnus bits by me
This commit is contained in:
parent
14760fb0b1
commit
e821fd7cc3
@ -1,8 +1,8 @@
|
|||||||
# $OpenBSD: Makefile,v 1.10 2005/10/07 00:21:04 fgsch Exp $
|
# $OpenBSD: Makefile,v 1.11 2007/09/07 08:13:20 aanriot Exp $
|
||||||
|
|
||||||
COMMENT= "easy to use Bayesian spam filter"
|
COMMENT= easy to use Bayesian spam filter
|
||||||
DISTNAME= bmf-0.9.4
|
DISTNAME= bmf-0.9.4
|
||||||
PKGNAME= ${DISTNAME}p0
|
PKGNAME= ${DISTNAME}p1
|
||||||
CATEGORIES= mail
|
CATEGORIES= mail
|
||||||
HOMEPAGE= http://sourceforge.net/projects/bmf
|
HOMEPAGE= http://sourceforge.net/projects/bmf
|
||||||
|
|
||||||
@ -35,9 +35,6 @@ INSTALL_TARGET= MANDIR=${PREFIX}/man \
|
|||||||
BINDIR=${PREFIX}/bin \
|
BINDIR=${PREFIX}/bin \
|
||||||
install
|
install
|
||||||
|
|
||||||
|
|
||||||
DOCS= README ${FILESDIR}/OpenBSD-bmf-mini-howto.html
|
|
||||||
|
|
||||||
NO_REGRESS= Yes
|
NO_REGRESS= Yes
|
||||||
|
|
||||||
post-install:
|
post-install:
|
||||||
@ -45,7 +42,7 @@ post-install:
|
|||||||
strip ${PREFIX}/bin/$$f; \
|
strip ${PREFIX}/bin/$$f; \
|
||||||
done
|
done
|
||||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bmf
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bmf
|
||||||
${INSTALL_DATA} ${WRKSRC}/${DOCS} ${PREFIX}/share/doc/bmf
|
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/bmf
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
|
||||||
|
@ -1,127 +0,0 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>bmf mini-howto</title>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
|
|
||||||
<link rel="STYLESHEET" href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/docbook.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Theoretical part:</h3>
|
|
||||||
|
|
||||||
<p>Before you start to use bmf it is a good thing to know a little bit about
|
|
||||||
the theoretical background of
|
|
||||||
<a href="http://www.paulgraham.com/spam.html">Bayesian spamfiltering</a>.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Training bmf:</h3>
|
|
||||||
|
|
||||||
<p>Lets take a look at this basic <tt class="FILENAME">.procmailrc</tt> example.
|
|
||||||
|
|
||||||
<dl><dd><pre>
|
|
||||||
:0fw
|
|
||||||
* < 256000
|
|
||||||
| bmf -p
|
|
||||||
|
|
||||||
:0e
|
|
||||||
{
|
|
||||||
EXITCODE=$?
|
|
||||||
}
|
|
||||||
|
|
||||||
:0:
|
|
||||||
* ^X-Spam-Status: Yes
|
|
||||||
zspam # This is the mailbox where all spam goes.
|
|
||||||
|
|
||||||
:0w
|
|
||||||
inbox # This is your inbox</pre></dd></dl>
|
|
||||||
|
|
||||||
|
|
||||||
<p>bmf will now sort your mail in a spam and non-spam folder. Training
|
|
||||||
bmf means you have to tell it when it has made a mistake.
|
|
||||||
|
|
||||||
As an example you can add these shortcuts to your <tt class="FILENAME">.muttrc</tt>
|
|
||||||
|
|
||||||
<dl><dd><pre>
|
|
||||||
macro index <f3> "|bmf -S\n<save-message>=zspam\n" "SPAM"
|
|
||||||
macro index <f4> "|bmf -N\n<save-message>=inbox\n" "NOT SPAM"
|
|
||||||
macro pager <f3> "|bmf -S\n<save-message>=zspam\n" "SPAM"
|
|
||||||
macro pager <f4> "|bmf -N\n<save-message>=inbox\n" "NOT SPAM"
|
|
||||||
</pre></dd></dl>
|
|
||||||
|
|
||||||
<p>Now you can press the F3 button to tell bmf a message in your inbox
|
|
||||||
is spam ( <tt class="FILENAME">bmf -S</tt> ) and move it to your
|
|
||||||
spam-folder. If you find a non-spam message in your spam-folder you
|
|
||||||
can press F4 and bmf will unregister the message as spam and put it
|
|
||||||
in your normal mailfolder.
|
|
||||||
|
|
||||||
<h3>Feeding a spam-archive to bmf:</h3>
|
|
||||||
<p>To speed up the process of feeding the bmf-database you can also
|
|
||||||
download a recent
|
|
||||||
<a href="http://www.em.ca/~bruceg/spam/">spam archive</a>
|
|
||||||
and run the files in the archive through the following one-liner:
|
|
||||||
|
|
||||||
<dl><dd><pre>for i in * ; do bmf -s -i $i; done</pre></dd></dl>
|
|
||||||
|
|
||||||
<p>This method is not recommended by the author since the headers of a
|
|
||||||
message are also taken in account. And the headers of the messages
|
|
||||||
from a spam-archive do not match yours. But I had good results with
|
|
||||||
this method.
|
|
||||||
|
|
||||||
<h3>Mixing with SpamAssassin:</h3>
|
|
||||||
|
|
||||||
<p>You can also mix bmf with
|
|
||||||
<a href="http://spamassassin.org">SpamAssassin</a>.
|
|
||||||
bmf is much lighter than spamassassin but SpamAssassin does not have
|
|
||||||
to be trained. You can actually use SpamAssassin to train bmf. Change
|
|
||||||
your <tt class="FILENAME">.procmailrc</tt> to something like this:
|
|
||||||
|
|
||||||
<dl><dd><pre>
|
|
||||||
:0fw
|
|
||||||
* < 256000
|
|
||||||
| bmf -p
|
|
||||||
|
|
||||||
:0e
|
|
||||||
{
|
|
||||||
EXITCODE=$?
|
|
||||||
}
|
|
||||||
|
|
||||||
:0:
|
|
||||||
* ^X-Spam-Status: Yes
|
|
||||||
zspam-bmf
|
|
||||||
|
|
||||||
|
|
||||||
:0fw
|
|
||||||
* < 256000
|
|
||||||
| spamc -p 4321 -f
|
|
||||||
|
|
||||||
:0e
|
|
||||||
{
|
|
||||||
EXITCODE=$?
|
|
||||||
}
|
|
||||||
|
|
||||||
:0:
|
|
||||||
* ^X-Spam-Status: Yes
|
|
||||||
{
|
|
||||||
:0c
|
|
||||||
| spamassassin -d | bmf -S
|
|
||||||
:0
|
|
||||||
zspam-sa
|
|
||||||
}
|
|
||||||
|
|
||||||
:0w
|
|
||||||
inbox</pre></dd></dl>
|
|
||||||
|
|
||||||
<p>All spam caught by bmf will be send to the zspam-bmf folder. All spam
|
|
||||||
missed by bmf but caught by SpamAssassin will be fed to bmf for
|
|
||||||
training and then send to the zspam-sa folder.
|
|
||||||
|
|
||||||
|
|
||||||
<h3>Disclaimer:</h3>
|
|
||||||
|
|
||||||
<p>If anything bad happens to your email I am not responsible. If you
|
|
||||||
have any improvements to this document please send them to the
|
|
||||||
maintainer of this port.
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
29
mail/bmf/patches/patch-README
Normal file
29
mail/bmf/patches/patch-README
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
$OpenBSD: patch-README,v 1.1 2007/09/07 08:13:20 aanriot Exp $
|
||||||
|
--- README.orig Fri Sep 7 10:02:26 2007
|
||||||
|
+++ README Fri Sep 7 10:03:34 2007
|
||||||
|
@@ -92,6 +92,25 @@ These will override these commands:
|
||||||
|
<Esc>t = test for spamicity.
|
||||||
|
<Esc>u = de-register as spam, register as non-spam, and move to inbox folder.
|
||||||
|
|
||||||
|
+Alternatively, if you use gnus you could add the following lines to your
|
||||||
|
+.gnus to accomplish a similar result:
|
||||||
|
+
|
||||||
|
+(defun spam ()
|
||||||
|
+ (interactive)
|
||||||
|
+ (pipe-message "/usr/local/bin/bmf -S")
|
||||||
|
+ (gnus-summary-move-article 1 "nnml:Spam"))
|
||||||
|
+
|
||||||
|
+(defun notspam ()
|
||||||
|
+ (interactive)
|
||||||
|
+ (pipe-message "/usr/local/bin/bmf -N")
|
||||||
|
+ (gnus-summary-move-article 1 "nnml:inbox"))
|
||||||
|
+
|
||||||
|
+(add-hook
|
||||||
|
+ 'gnus-sum-load-hook
|
||||||
|
+ (lambda nil
|
||||||
|
+ (define-key gnus-summary-mode-map (read-kbd-macro "C-c C-o") 'spam)
|
||||||
|
+ (define-key gnus-summary-mode-map (read-kbd-macro "C-c C-p") 'notspam)))
|
||||||
|
+
|
||||||
|
How to train bmf
|
||||||
|
================
|
||||||
|
|
@ -1,8 +1,7 @@
|
|||||||
@comment $OpenBSD: PLIST,v 1.3 2004/09/15 09:09:41 espie Exp $
|
@comment $OpenBSD: PLIST,v 1.4 2007/09/07 08:13:20 aanriot Exp $
|
||||||
bin/bmf
|
bin/bmf
|
||||||
bin/bmfconv
|
bin/bmfconv
|
||||||
@man man/man1/bmf.1
|
@man man/man1/bmf.1
|
||||||
@man man/man1/bmfconv.1
|
@man man/man1/bmfconv.1
|
||||||
share/doc/bmf/
|
share/doc/bmf/
|
||||||
share/doc/bmf/OpenBSD-bmf-mini-howto.html
|
|
||||||
share/doc/bmf/README
|
share/doc/bmf/README
|
||||||
|
Loading…
x
Reference in New Issue
Block a user