KnujOn Thunderbird Extension

< home 

details - options - installation - tips

NOTICE: Updates for Thunderbird 3 and 5...

Apologies to everyone updating to more recent Thunderbird releases - the KnujOn extension isn't compatible yet, and I don't have the time right now to figure out the changes necessary.

You can help

Not a developer?  That's fine - the trickiest part of developing Thunderbird extensions is figuring out how to use the Thunderbird API... and the documentation isn't great, so the quickest approach is to find other up-to-date extensions that do similar things and review their code for clues (hooray, open source!).  So - let me know if you see an updated, preferably-simple Thunderbird extension with features like the KnujOn extension.  In short, I need to:
  • add a button to the toolbar
  • grab all emails marked "junk" from the currently open folder
  • create a new message, set the recipient, and add attachments to it
  • move the reported messages to a selected folder, the trash, or delete them
You are a developer? Great. Patches are very welcome (if you're a developer with solid JavaScript experience and can take the time to dig around online resources, you can develop an Mozilla extension); the source code is part of the extension itself: just unzip the XPI and dig around.  The .jar file inside is also in (uncompressed) zip format.

I'm not abandoning the project, but I do have very limited spare time currently.  Thanks for your patience!


I rewrote the open-source BlueFrog Thunderbird Extension to remove all Blue Security trademarks and copyrighted images, and to allow Thunderbird and SeaMonkey users to forward their email to KnujOn instead (see for more information). I also added some new features, such as limiting the number of junk emails that can be attached to a single message (the current default is 300), and fixed a lot of bugs.

I contacted KnujOn and got permission to use their logo and name (NOTE: they appreciate the extension, but it is not officially endorsed, developed, or supported by KnujOn).

This extension will put a "KnujOn" button on your toolbar. Clicking the button will create a new email with a subset of the emails marked "Junk" in the current folder attached (see below to configure how many to send at a time), ready to send to KnujOn's reporting address. Just click send and you're done -- this might take a while if you have a lot of spam! -- and those junk messages can be purged, or moved to another folder if you want (also configurable; see below).

Known Issues (patches welcome)

Reported junk not deleted: A few users have found that the extension fails to delete the junk emails after sending the report.  This seems to be caused by a conflict with other extensions (SendTools is one confirmed conflict, though there may be others); to check if this is affecting you, try disabling your other extensions, setting your KnujOn send limit to "10" or so for testing, and enable the other extensions one at a time until one of them breaks the KnujOn extension.  Workaround: move messages instead of deleting them, or find the conflicting extension and disable it.

Grouped by Sort prevents report: If you have selected the "Grouped by Sort" view for your current mailbox, the KnujOn button won't do anything (there will be an error in the error console).  Workaround: Choose "Threaded" or "Unthreaded" for your mailbox view before reporting junk.

Options ID
If you are registered with, enter the user ID they gave you ( Otherwise, you can leave the default value, "nonregistered".

Custom reporting address(es)
If you want to report spam to other reporting addresses as well as KnujOn (such as SpamCop), just paste them here, separated by commas.

Maximum number of spam to report at a time
If you attach too many spams to a single email, you can run into problems with size limits. By default, this plugin will only attach 300 spams to each report -- if you have more than that, you can press the KnujOn button again to continue reporting once the first report has been successfully sent.

This option lets you change the limit.

Forward spam contents inline
Normally, the junk emails are forwarded as message attachments to the original email; this option sends the text of the spam inline in a single message.  Either method is fine with KnujOn -- you may need the inline method for reporting elsewhere.

After Reporting junk mail
You have three choices for how to handle junk mail after you report it:

  • Leave it: do nothing and leave the messages where they are
  • Delete it completely: purges the reported messages completely (skips the Trash)
  • Move it to selected folder: move the reported messages to the folder you select
    (recommendation: create a folder called "JunkSent" under "Local Folders", and move it there)


If you are a Firefox user, DO NOT click directly on the download link (that will try to install it as a Firefox extension) -- you need to right-click and save the file.

Download: knujon-2.0.0-tb.xpi (updated 2008-03-17)

This version adds a lot of new features (optional inline attachments, move to any folder after reporting, custom reporting addresses, updated tips), fixes bugs and stability problems (conflicts with Habu/Okopipi plugins, failure to delete/move messages if you change folders while sending, junk subject lines didn't show up as attachment names, and many more), and adds support for SeaMonkey.

If you use the habu plugin, you can also test the new beta version of that plugin (with merged codebases and all fixes from here included except SeaMonkey support): habu-2.0.0-beta-tb.xpi

In Thunderbird:

  • Select Tools -> Add-ons
  • Click Install and select the xpi file you downloaded
  • You will be prompted to restart Thunderbird before using the extension
  • You should see the KnujOn icon on your toolbar; if not, right-click on the toolbar, select Customize..., then drag the KnujOn icon to your toolbar.
  • To edit options, select Tools -> KnujOn Extension Options, or access options from the Add-ons manager (also in the Tools menu).
  • To uninstall, select Tools -> Add-ons, select the KnujOn extension and click Uninstall; then restart Thunderbird.

In SeaMonkey:

  • In your Navigator window (NOT Mail & News!) select File -> Open File and select the XPI file you downloaded.  Follow the prompts to install.
  • Restart SeaMonkey (all windows, including Mail & Newsgroups) after installation.
  • You should see the KnujOn icon on your Mail & Newsgroups toolbar.
  • To edit options, select Tools -> KnujOn Extension Options
  • To uninstall the extension, you'll need the Mnenhy Chrome Manager extension (unless you want to edit the files by hand...):


Use the Auto-Zip Attachments add-on

Reporting your junk to KnujOn means sending a bunch of obvious spam... by email.  Your ISP may block you from sending these messages.  If that happens to you, install the Auto Zip Attachments add-on -- then before sending your spam report, click the "AutoZip" button to zip up all of that spam.

This also makes it much quicker to send large reports, particularly if you have a slow connection!

Use local folders

If your email account is set up on an IMAP server, every time you move a message from one folder to another (or force Thunderbird to load that message), there's a server interaction involved. With single messages, this doesn't matter much... but if you're dealing with hundreds of junk emails (or more), it's deadly.

Make sure your "Junk" folder is a local folder. Thunderbird should have a separate icon called "Local Folders", with folders under it -- create "Junk" and "Trash" folders there (trash is another good candidate for a local folder, since you don't usually need to check your trash from the road!). Then update your Copies & Folders settings to use "Trash" under Local Folders, and update the Junk Settings to move junk to "Junk" under Local Folders.

I have a handful of different email accounts -- they all ship their junk into the same local Junk folder for easy and fast reporting.

The reports are clogging up my sent folder!

You can keep your junk reports from being stored in your Sent folder!  You need to set up a new "identity" that doesn't store sent mail, and use that for sending your reports.  Here's how:

  1. Go to the Tools menu, select "Account Settings", and click on your main email account.
  2. Click "Manage Identities..." on the lower-right, to open Multiple Identities Support.
  3. Click "Add...".  On the Settings tab, fill in Your Name, Email Address, and select your Outgoing Server.
    I put "Spam Report" under name to keep it clear what this identity was for.
  4. On the Copies & Folders tab, see "When sending messages, automatically:" and UNCHECK "Place a copy in:".  You don't want to save copies.
  5. Click OK.
  6. Now, your messages will let you select what identity to use (there will be a dropdown for the From field).  When sending KnujOn reports, just choose the "Spam Report" identity.

    Future feature for this extension: choose the identity to use in the extension Options, so it can default to the identity you want.

Dealing with wrong sent dates

Most people sort messages using the Date column. But often junk messages (and sometimes real messages!) have an incorrect sent date, so they pop up somewhere in the middle (or at the beginning) and sneak by you... which is irritating when you'd rather have the junk reported and cleaned out, plus frustrating when it happens with real messages because of someone's misconfigured computer.

Here's an easy fix: use the Displayed columns selector () to add "Order received", and sort your messages on that column. You can shrink the column itself down to nearly nothing (since you probably don't really care what it says).

When you're overwhelmed

If you're absolutely flooded with junk mail, you have fewer options. I have catch-all addresses on a few web domains, and they usually only collect a few hundred spam a day... but a few times I've checked my accounts in the morning to find thousands and thousands of new messages... spam backscatter from a spammer using my domain in return addresses.

Depending on how bad it is (and how much spare time I have...) I either delete them in bulk, or (slower) report them in bulk.

Deleting in bulk

First, open your account settings and go to "Server Settings". Uncheck both checkboxes related to checking for new messages. You have enough already (plus you don't want the view refreshing while you're mid-delete).

After "When I delete a message:" choose "Remove it immediately". This is more dangerous -- you have to make sure you don't delete real messages -- but you'll save the time of loading the messages, moving them to Trash, etc..

Next, open "Junk Settings" and disable junk filtering completely.  Thunderbird downloads messages to screen them (and refreshes your folder view after moving Junk messages), and you don't want that!

Finally: your poor inbox. Sort it by "Subject". Most bounced messages share a handful of common subject lines. You can choose the first in a long series, scroll to the last with the slider, then Shift-click the last one (to select the whole range), then delete it.

When you have your inbox back under control, don't forget to change back your check mail, delete and junk options.

Reporting in bulk

First, make sure your Drafts folder is local (see "Use local folders" above for details). You will also need to know how to use an FTP client for this method.

Then do mass selects (like above), but right-click the messages selected and choose "Forward as attachments". This will build you a massive email -- don't send it! Save it as a Draft and close it. Then open the Drafts folder, right-click it, and "Save As..." to save it as a file.

Do that until you've saved all of the spam as files. Then zip them, and follow KnujOn's instructions for FTPing them up.

PENDING: I don't remember at which step in this process it's safe to delete the selected spam messages. It's also possible that Thunderbird has changed, so you can save the message directly as a file (instead of saving the draft first)... if you have these or other details to add here, please contact me. Thanks!

The code is licensed under the Mozilla Public License.  Patches are welcome, and you are also free to make your own extension based on this one.