|
Packit |
e8bc57 |
Bogofilter -- fast Bayesian spam filtering
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
Summary:
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
0. Important
|
|
Packit |
e8bc57 |
1. What is Bogofilter?
|
|
Packit |
e8bc57 |
2. Documentation
|
|
Packit |
e8bc57 |
3. Installing Bogofilter
|
|
Packit |
e8bc57 |
4. How to contribute
|
|
Packit |
e8bc57 |
5. How to request features
|
|
Packit |
e8bc57 |
6. Building & Installing Bogofilter from Source Tarball or Git
|
|
Packit |
e8bc57 |
a. Downloading
|
|
Packit |
e8bc57 |
b. Building & Installing
|
|
Packit |
e8bc57 |
c. Configuring
|
|
Packit |
e8bc57 |
d. Changing Bogofilter
|
|
Packit |
e8bc57 |
7. License
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
0. IMPORTANT
|
|
Packit |
e8bc57 |
------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
If you are using bogofilter with the Berkeley DB data base library
|
|
Packit |
e8bc57 |
(which is the default, received most testing, is the most powerful of
|
|
Packit |
e8bc57 |
the data base engines that bogofilter supports and hence recommended),
|
|
Packit |
e8bc57 |
do read the doc/README.db file, it contains important information.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
The doc/README.db file contains troubleshooting information and
|
|
Packit |
e8bc57 |
requirements that should be read ahead of time so you can fix problems
|
|
Packit |
e8bc57 |
quickly should they arise later.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
1. What is Bogofilter?
|
|
Packit |
e8bc57 |
----------------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
Bogofilter is a fast Bayesian spam filter along the lines suggested by
|
|
Packit |
e8bc57 |
Paul Graham in his article "A Plan For Spam":
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
http://www.paulgraham.com/spam.html
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
with algorithmic changes suggested by Gary Robinson in:
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
http://radio.weblogs.com/0101454/stories/2002/09/16/spamDetection.html
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
and in "A Statistical Approach to the Spam Problem":
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
http://www.linuxjournal.com/article.php?sid=6467
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
This version improves on the papers by doing smarter lexical analysis.
|
|
Packit |
e8bc57 |
In particular, hostames and IP addresses are retained as recognition
|
|
Packit |
e8bc57 |
features rather than broken up. Various kinds of MTA cruft such as
|
|
Packit |
e8bc57 |
dates and message-IDs are discarded so as not to bloat the word lists.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
2. Documentation
|
|
Packit |
e8bc57 |
----------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
It is recommended, although not necessary, that you install the GNU
|
|
Packit |
e8bc57 |
Scientific Library (GSL) version 1.4 or newer before configuring
|
|
Packit |
e8bc57 |
bogofilter. This allows bogofilter to link dynamically against a
|
|
Packit |
e8bc57 |
system-wide GSL rather than statically against a shipped GSL subset,
|
|
Packit |
e8bc57 |
conserving memory and disk space.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
When installed, there are man pages for bogofilter, bogoutil,
|
|
Packit |
e8bc57 |
bogolexer, and bogoupgrade. Additional documentation is in
|
|
Packit |
e8bc57 |
/usr/share/doc/bogofilter-x.y.z or comparable directory (depending on
|
|
Packit |
e8bc57 |
your operating system).
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
If you've installed the source code, the doc directory and its
|
|
Packit |
e8bc57 |
subdirectories contain most of bogofilter's documentation. In it are
|
|
Packit |
e8bc57 |
a variety of README files, the xml originals for the man pages , and
|
|
Packit |
e8bc57 |
other documents. Additionally, many of the directories in the
|
|
Packit |
e8bc57 |
bogofilter hierarchy have their own README files.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
If you use mutt, see the bogofilter(1) manual page for helpful macros
|
|
Packit |
e8bc57 |
you can add to your .muttrc.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
3. Installing Bogofilter
|
|
Packit |
e8bc57 |
----------------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
When updating, check the RELEASE.NOTES files.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
For fresh installs, check the rest of this file and the INSTALL file.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
You can safely ignore any of these compile time warnings:
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
warning: unused parameter ...
|
|
Packit |
e8bc57 |
warning: format not a string literal, argument types not checked
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
4. How to contribute
|
|
Packit |
e8bc57 |
--------------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
The best way to contribute to bogofilter is through the bogofilter
|
|
Packit |
e8bc57 |
mailing list, bogofilter@bogofilter.org. You can subscribe to it by
|
|
Packit |
e8bc57 |
sending a message to bogofilter-subscribe@bogofilter.org and
|
|
Packit |
e8bc57 |
responding to the confirmation message it sends to you. More
|
|
Packit |
e8bc57 |
information is available on the bogofilter home page at
|
|
Packit |
e8bc57 |
http://www.bogofilter.org/ or http://bogofilter.sourceforge.net/
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
Bugs can be reported via the bogfilter mailing list or through the
|
|
Packit |
e8bc57 |
issue trackers:
|
|
Packit |
e8bc57 |
https://gitlab.com/bogofilter/bogofilter/issues
|
|
Packit |
e8bc57 |
http://sourceforge.net/tracker/?atid=499997&group_id=62265&func=browse
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
If you have code to contribute, please post it on the bogofilter
|
|
Packit |
e8bc57 |
mailing list or file it to one of the issue trackers (Gitlab preferred).
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
5. How to request features
|
|
Packit |
e8bc57 |
--------------------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
Ask around in the bogofilter mailing list. The idea may have been
|
|
Packit |
e8bc57 |
already suggested, considered, accepted, rejected, ... You won't know
|
|
Packit |
e8bc57 |
until you ask!
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
Alternatively, you might want to hack at the code and develop the
|
|
Packit |
e8bc57 |
feature on your own, which would be great! You can then send a patch
|
|
Packit |
e8bc57 |
to the list.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
6. Building & Installing Bogofilter from Source Tarball or Git
|
|
Packit |
e8bc57 |
--------------------------------------------------------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
a. Downloading
|
|
Packit |
e8bc57 |
--------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
The most recent version of this software is available at:
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
http://sourceforge.net/projects/bogofilter/
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
The latest stable version can be downloaded. The development source
|
|
Packit |
e8bc57 |
is in a Subversion repository on SourceForge. To download the latest Git
|
|
Packit |
e8bc57 |
source, cd to the directory to which you wish to download and type
|
|
Packit |
e8bc57 |
EITHER ONE of the following commands:
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
git clone https://gitlab.com/bogofilter/bogofilter.git
|
|
Packit |
e8bc57 |
OR
|
|
Packit |
e8bc57 |
git clone git://git.code.sf.net/p/bogofilter/git bogofilter-git
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
b. Building & Installing
|
|
Packit |
e8bc57 |
------------------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
To compile and install the standard configuration from a tarball, use
|
|
Packit |
e8bc57 |
the following commands:
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
cd bogofilter-1.2.5 [change to project directory]
|
|
Packit |
e8bc57 |
./configure [add configure options as required]
|
|
Packit |
e8bc57 |
make all check
|
|
Packit |
e8bc57 |
make install [as root]
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
To compile and install the standard configuration from Git, use
|
|
Packit |
e8bc57 |
the following commands:
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
cd bogofilter [change to project directory]
|
|
Packit |
e8bc57 |
./autogen.sh [add configure options as required]
|
|
Packit |
e8bc57 |
make install [as root]
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
Be sure to read README.git for additional preparations required.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
You will need a full set of development tools installed to be able
|
|
Packit |
e8bc57 |
to run autogen.sh, including recent automake and autoconf.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
configure does not have these requirements.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
c. Configuring
|
|
Packit |
e8bc57 |
--------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
After using ./autogen.sh, which builds the standard configuration
|
|
Packit |
e8bc57 |
and runs "make check" to ensure it works in your environment and on
|
|
Packit |
e8bc57 |
your hardware, you might wish to further customize bogofilter for
|
|
Packit |
e8bc57 |
your use.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
Running "./configure --help" will list all the configuration
|
|
Packit |
e8bc57 |
options. The most notable ones are, with examples:
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
--prefix=PREFIX install architecture-independent files in PREFIX
|
|
Packit |
e8bc57 |
[default: /usr/local]
|
|
Packit |
e8bc57 |
--with-database=ENGINE Choose database engine
|
|
Packit |
e8bc57 |
{db|qdbm|sqlite3|tokyocabinet|kyotocabinet|lmdb}
|
|
Packit |
e8bc57 |
[default: db]
|
|
Packit |
e8bc57 |
CPPFLAGS=-I/opt/csw/include
|
|
Packit |
e8bc57 |
Choose additional include file path /opt/csw/include
|
|
Packit |
e8bc57 |
LDFLAGS=-L/opt/csw/lib Ditto, for library files
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
d. Changing Bogofilter
|
|
Packit |
e8bc57 |
----------------------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
If you make modifications to bogofilter, you may need to have a
|
|
Packit |
e8bc57 |
recent DocBook XML tool chain, the xmlto program, PassiveTeX and
|
|
Packit |
e8bc57 |
XMLTeX, recent versions of automake and autoconf.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
These requirements do not apply if you are building an unmodified
|
|
Packit |
e8bc57 |
tarball.
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
7. License
|
|
Packit |
e8bc57 |
----------
|
|
Packit |
e8bc57 |
|
|
Packit |
e8bc57 |
Bogofilter is offered under the GNU General Public License,
|
|
Packit |
e8bc57 |
see the COPYING file for details. Note that some parts, especially in
|
|
Packit |
e8bc57 |
the contrib/ section or scripts, may be under a different license.
|