ArticleslgStudy

computer science

Bogofilter

Bogofilter is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Bogofilter rather than just read about it. In short: Bogofilter is a mail filter that classifies e-mail as spam or ham (non-spam) by a statistical analysis of the message's header and content (body). The program is able to learn from the user's classifications and corrections.

Key takeaways

  • Bogofilter belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Bogofilter to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Bogofilter from memory before moving on to harder problems.

Reference excerpt

Bogofilter is a mail filter that classifies e-mail as spam or ham (non-spam) by a statistical analysis of the message's header and content (body). The program is able to learn from the user's classifications and corrections. It was originally written by Eric S. Raymond after he read Paul Graham's article "A Plan for Spam" and is now maintained together with a group of contributors by David Relson, Matthias Andree and Greg Louis. The statistical technique used is known as Bayesian filtering. Bogofilter's primary algorithm uses the f(w) parameter and the Fisher inverse chi-square technique that he describes. Bogofilter may be run by a MDA or mail client to classify messages as they are delivered to recipient mailboxes, or be used by a MTA to classify messages as they are received from the sending SMTP server. Bogofilter examines tokens in the message body and header, and refers to wordlists stored by BerkeleyDB, SQLite or QDBM to calculate a probability score that a new message is spam. Bogofilter provides processing for plain text and HTML and supports reading multi-part MIME message including base64, quoted-printable, and uuencoded text or HTML. Bogofilter ignores non-text attachments, such as images. It is possible to tune Bogofilter's statistical algorithms by modifying various coefficients and other settings in its configuration file, or by using the automated bogotune utility included with the software, which attempts to optimise various coefficients to maximise filtering efficiency for a particular corpus of spam and non-spam. Standard tests at TREC 2005 show that Bogofilter compares well to its competitors spambayes, CRM114 and DSPAM. Other competitors include, but are not limited to Spamprobe and QSF. Bogofilter is written in C, and runs on Linux, FreeBSD, NetBSD, OpenBSD, Solaris, Mac OS X, HP-UX, AIX and other platforms. It is released under the GNU GPL.

Email clients that can use Bogofilter The following email clients are known to support Bogofilter as a spam filtering backend:

GNOME Evolution Claws Mail KMail Mutt (email client) Alpine (email client)

See also Blacklist Greylisting Whitelist Tarpit

References

External links Official homepage "Bogofilter". Freecode. A Plan for Spam – An essay by Paul Graham discussing the main ideas behind this program This article, or an earlier revision of it, was edited from bogofilter's homepage.

Worked examples

Example 1 — a first encounter with Bogofilter

Start with the simplest possible case. Write down what Bogofilter claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Bogofilter before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Bogofilter ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Bogofilter

In research
Bogofilter appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Bogofilter in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Bogofilter is common in secondary-school and first-year university syllabi. It links to neighbouring topics Anti-spam, Free email software, Spamming, so understanding it makes those chapters shorter.
In everyday life
Look for Bogofilter outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Bogofilter” →

How to study Bogofilter in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Bogofilter means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Bogofilter out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Bogofilter in simple terms?

Bogofilter is a mail filter that classifies e-mail as spam or ham (non-spam) by a statistical analysis of the message's header and content (body). The program is able to learn from the user's classifications and corrections.

Why does Bogofilter matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Bogofilter?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Bogofilter.

Tags

  • Anti-spam
  • Free email software
  • Spamming

Keep exploring