2002-11-01 12:38:05 -05:00
|
|
|
<!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>
|
|
|
|
|
2002-11-29 07:56:57 -05:00
|
|
|
<p>Before you start to use bmf it is a good thing to know a little bit about
|
2002-11-01 12:38:05 -05:00
|
|
|
the theoretical background of
|
2002-11-29 07:56:57 -05:00
|
|
|
<a href="http://www.paulgraham.com/spam.html">Bayesian spamfiltering</a>.
|
2002-11-01 12:38:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
<h3>Basic installation:</h3>
|
|
|
|
|
2002-11-29 07:56:57 -05:00
|
|
|
<p>After installing the port put this at the top of your
|
|
|
|
<tt class="FILENAME">.procmailrc</tt>.
|
2002-11-01 12:38:05 -05:00
|
|
|
|
|
|
|
<dl><dd><pre>
|
|
|
|
:0fw
|
|
|
|
* < 256000
|
|
|
|
| bmf -p
|
|
|
|
|
|
|
|
:0e
|
|
|
|
{
|
|
|
|
EXITCODE=$?
|
|
|
|
}
|
|
|
|
|
|
|
|
:0:
|
|
|
|
* ^X-Spam-Status: Yes
|
2002-11-29 07:56:57 -05:00
|
|
|
zspam # This is the mailbox where all spam goes.</pre></dd></dl>
|
2002-11-01 12:38:05 -05:00
|
|
|
|
2002-11-29 10:46:25 -05:00
|
|
|
<p>Now you have to tell bmf the difference between spam and non-spam messages.
|
2002-11-01 12:38:05 -05:00
|
|
|
|
|
|
|
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>=Maildir\n" "NO SPAM"
|
|
|
|
macro pager <f3> "|bmf -S\n<save-message>=zspam\n" "SPAM"
|
|
|
|
macro pager <f4> "|bmf -N\n<save-message>=Maildir\n" "NO SPAM"
|
|
|
|
</pre></dd></dl>
|
|
|
|
|
2002-11-29 07:56:57 -05:00
|
|
|
<p>Now you can press the F3-button to tell bmf a message in your inbox
|
2002-11-29 10:46:25 -05:00
|
|
|
is spam ( <tt class="FILENAME">bmf -S</tt> ) and move it to your
|
2002-11-29 07:56:57 -05:00
|
|
|
spam-folder.
|
2002-11-29 10:46:25 -05:00
|
|
|
|
2002-11-01 12:38:05 -05:00
|
|
|
|
|
|
|
<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
|
2002-11-29 10:46:25 -05:00
|
|
|
<a href="http://www.em.ca/~bruceg/spam/">spam archive</a>
|
2002-11-01 12:38:05 -05:00
|
|
|
and run the files in the archive through the following oneliner:
|
|
|
|
|
|
|
|
<dl><dd><pre>for i in * ; do bmf -s -i $i; done</pre></dd></dl>
|
|
|
|
|
2002-11-29 07:56:57 -05:00
|
|
|
<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
|
2002-11-29 10:46:25 -05:00
|
|
|
from a spam-archive do not match yours, but I had good results with
|
2002-11-29 07:56:57 -05:00
|
|
|
this method.
|
|
|
|
|
2002-11-01 12:38:05 -05:00
|
|
|
<h3>Mixing with spamassassin:</h3>
|
|
|
|
|
|
|
|
<p>You can also mix bmf with
|
2002-11-29 10:46:25 -05:00
|
|
|
<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:
|
2002-11-01 12:38:05 -05:00
|
|
|
|
|
|
|
<dl><dd><pre>
|
|
|
|
:0fw
|
|
|
|
* < 256000
|
|
|
|
| bmf -p
|
|
|
|
|
|
|
|
:0e
|
|
|
|
{
|
|
|
|
EXITCODE=$?
|
|
|
|
}
|
|
|
|
|
|
|
|
:0:
|
|
|
|
* ^X-Spam-Status: Yes
|
2002-11-29 07:56:57 -05:00
|
|
|
zspam-bmf
|
2002-11-01 12:38:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
:0fw
|
|
|
|
* < 256000
|
|
|
|
| spamc -p 4321 -f
|
|
|
|
|
|
|
|
:0e
|
|
|
|
{
|
|
|
|
EXITCODE=$?
|
|
|
|
}
|
|
|
|
|
|
|
|
:0:
|
|
|
|
* ^X-Spam-Status: Yes
|
|
|
|
{
|
|
|
|
:0c
|
|
|
|
| bmf -S
|
|
|
|
:0
|
2002-11-29 07:56:57 -05:00
|
|
|
zspam-sa
|
2002-11-01 12:38:05 -05:00
|
|
|
}
|
|
|
|
</pre></dd></dl>
|
|
|
|
|
2002-11-29 10:46:25 -05:00
|
|
|
<p>All mail cought by bmf will be send to the zspam-bmf folder. All spam
|
|
|
|
missed by bmf but cought by spamassassin will be fed to bmf for
|
|
|
|
training and send to the zspam-sa folder.
|
2002-11-29 07:56:57 -05:00
|
|
|
|
2002-11-01 12:38:05 -05:00
|
|
|
|
|
|
|
<h3>Disclaimer:</h3>
|
|
|
|
|
|
|
|
<p>If anything bad happens to your email I am not responsible. If you
|
|
|
|
know improvements to this document please send them to the maintainer
|
|
|
|
of this port.
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|