ThunderBayes 0.2

ThunderBayes – integrate SpamBayes into Thunderbird.

Update: works with Thunderbird 2.0.0.* as of 04/11/2007.

Download ThunderBayes 0.2.1

New features in this version:

  • Improved the toolbar button to allow messages to be marked as ham or spam regardless of the actual spam status of the message.
  • Added “Move on mark as ham” feature, which moves messages to Local Folders Inbox by default (the folder can be customized in the ThunderBayes extension options).
  • Added two new columns to the message list (Thunderbird 2.0 only):
    1. Spam Status – a column that shows spam status with four icons:
      • Spam – red circle with slash
      • Unsure – yellow question mark
      • Ham – gray dot
      • Unknown – gray question mark (this means the message did not have a “X-Spambayes-Classification” header, which probably means it did not pass through the SpamBayes proxy)
    2. Spam Probability – a column that shows the spam probability as a percentage (0% is ham, 100% is spam). Note that this column will be blank for messages that were received before ThunderBayes 0.2 was installed.
  • Added a new “unsure” button state to the toolbar button.
  • Improved spam status recognition. ThunderBayes now uses the X-SpamBayes-Classification header to determine the spam status. In the past it relied on the junk status which was set using a filter.
  • Thunderbird 2.0 compatibility.

Send bug reports and feature requests to . Include the word “ThunderBayes” in the subject line.


General Overview

What does it do?

It provides a toolbar button similar to Thunderbird’s Junk button to classify email as Spam or Ham. Clicking the button causes two things to happen: (1) it sends the source of the selected messages to SpamBayes for training and (2) it optionally moves the messages to a folder of your choice (this can be configured in the extension options). It actually does one more minor thing: it sets the X-Spambayes-Classification header to the appropriate value. Give it a try, you’ll see how it works.

What it does not do:

  • It does not install SpamBayes (at this point the SpamBayes proxy must be installed and configured externally from Thunderbird). A future version of ThunderBayes may install SpamBayes automatically.
  • It does not filter mail classified by SpamBayes (Thunderbird’s powerful built-in filters can be configured to move spam classified by SpamBayes to whatever folder you choose and/or change the junk status of incoming email). Automatic filtering is planned for a future release.

Prerequisites for using ThunderBayes:

  • Install and configure the SpamBayes proxy. Windows users can go to the Windows page and look at the section entitled Non Outlook Solutions.
  • Configure your email account(s) in Thunderbird to use the proxy.

Thunderbird configuration recommendations (do this for each account that uses the proxy):

  • Disable the built-in junk mail controls (uncheck “Enable adaptive junk mail detection” on Adaptive Filter tab of Junk Mail Controls dialog).
  • Create a new message filter named “ThunderBayes-spam”
    Match any of the following
    “X-SpamBayes-Classification” is “spam” (use “Customize…” to add the new header)
    Move Message to Junk on Local Folders
    Mark As Read (if you’re feeling confident)
  • Create a new folder named “Unsure” (this is for messages classified by SpamBayes as “unsure”)
  • Create a new message filter named “ThunderBayes-unsure”
    Match any of the following
    “X-SpamBayes-Classification” is “unsure”
    Move Message to Unsure (the new folder)

Install ThunderBayes and add the “Spam” button to the toolbar. To add the button to the toolbar, right-click the toolbar and selecting “Customizeรƒโ€“” Then drag the “Spam” icon into your toolbar and click “OK” on the “Customize Toolbar” dialog.

This extension was born from my frustration with Thunderbird’s built-in spam filtering features. While I enjoyed the ability to classify email as spam/ham within Thunderbird, the built-in spam filter was not effective enough to make it usable on a long-term basis. Having past experience with SpamBayes, I immediately looked for the best way to integrate the two. Unfortunately, aside from an old rumor I found nothing. So I settled for the pop3 proxy distributed with SpamBayes. While this provided good spam classification results, it left room for improvement on the training procedure. The browser-based training mechanism, while effective, was not convenient and essentially required me to classify most spam that made it to my inbox twice: once to move it to the Junk folder within Thunderbird and once to classify it as spam in the SpamBayes web-interface. Hopefully this will put an end to the frustration.

9 Responses to “ThunderBayes 0.2”

- DancesWithBikers

Great add-on, but Thunderbird 2.0.0.0 (RC1) claims it is not compatible. Any fix for that?

- Daniel

A version that works with Thunderbird 2.0 has been uploaded to this site. Download it using the link at the beginning of this post.

I’m waiting for the new version to be approved on the Mozilla add-ons site.

- Moses

Hm. Somehow the button does not work on my computer… I’m running spambayes 1.04. The host and port of the webinterface are correctly set up in thunderbayes… is there anything I need to configure in SpamBayes?

- Moses

Me again.

Ok, the button seems to work, but not in the way I expected.. ๐Ÿ˜‰

ThunderBayes trained SpamBayes, but when I click on “Review Messages”, I can train SpamBayes on the same messages again…

I thought training with ThunderBayes would remove them from that list…

sorry for the inconvinience, I may have caused.

keep up the good work!

- Kevin Yank

ThunderBayes has made my Thunderbird dreams come true! ๐Ÿ™‚

That said, my ThunderBird [Mac OS X version 2.0.0.0 (20070326)] Error Console is full of error messages that I believe are being generated by ThunderBayes:

Error: [Exception… “‘JavaScript component does not have a method named: “getRowProperties”‘ when calling method: [nsIMsgCustomColumnHandler::getRowProperties]” nsresult: “0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)” location: “” data: no]

Additionally, I’m not positive that training messages with the ThunderBayes toolbar button is working. Is there some way to confirm this?

- Daniel

Kevin – thanks for trying ThunderBayes. BTW, I enjoy reading the Sitepoint Tech Times.

The errors you’re seeing are due to a problem with the new column handler support in Thunderbird 2.0. To tell the truth, I hadn’t even noticed, but now that I look my error console is full of them too. It looks like the custom column handler interface was changed between 2.0b2 and 2.0rc1. This is a minor thing–it does not affect the spam training code. You can download ThunderBayes 0.2.2 from the latest entry here on this blog or wait for it to be approved on Mozilla Add-ons.

P.S. I have plans to make it easier to tell if the manual training done by ThunderBayes is actually working. Right now the best way is to use ThunderBayes exclusively to do all SpamBayes training. You should know pretty quickly if its not working by the number of spam emails making to your inbox. Shameless plug: ever since I’ve started using ThunderBayes the number of spam messages that get through to my inbox has dropped to almost none.

- Kevin Yank

Hi Daniel,

I’m still not convinced ThunderBayes is training my SpamBayes installation. Although I manually trained it on a representative spam/ham sampling, and thus get pretty good results, I’m seeing a fair bit of repetitive missed spam showing up in my inbox even though I keep trying to train using ThunderBayes.

Conspicuously, the “total emails trained” count displayed by SpamBayes does not change when I train messages using ThunderBayes.

- Daniel

Kevin – I’m currently working on a new version of ThunderBayes that updates the SpamBayes review page on manual training. I’ll let you know when its ready. Thanks for your feedback so far.

- bypass network filter

Hi just passed by consedince while for some articles ๐Ÿ™‚ anyway nice blog Will check it out Later on ,hope you accept me as a friend blogger. thanks ^^