Junk Mail Controls

From MozillaZine Knowledge Base
Revision as of 20:26, 4 December 2006 by Barrkel (talk | contribs) (→‎Tweaking)
Jump to navigationJump to search

This article applies to both Thunderbird and the Mozilla Suite. The Junk Mail Controls interface in the Mozilla Suite is slightly different from the Thunderbird interface, described below.


Both Thunderbird and the Mozilla Suite can detect and filter unwanted e-mail messages. In order for the junk-mail filtering to be effective, however, you first need to "train" it because it uses Bayesian filtering.

Activating the Junk Mail Controls

To start using the Junk Mail Controls in Thunderbird:

  1. Go to "Tools -> Junk Mail Controls...".
  2. From the dropdown list, choose the email account for which you want to activate the Junk Mail Controls. Note that here, "email account" means the folder structure under which the emails are saved, so if you use the Global Inbox in Thunderbird, you need to select "Local Folders" as the account. This is different from the message filters, where you select the account that retrieves the email.
  3. Click the "Adaptive Filter" tab and make sure that the checkbox for "Enable adaptive junkmail detection" is checked. NOTE: Even though the phrase "Configure Junk Settings for: <account name>" shows when you are on this tab, the option to reset training data applies to ALL of your accounts. There is only one set of training data, so don't reset it here thinking you will only affect the account shown.
  4. Click the "Settings" tab and choose your settings for "White lists" and "Handling" as desired. Note:
    • You can choose to have junk messages sent to the Junk folder, but the Junk folder normally will not appear alongside your other mail folders until it is first used.
    • If you choose the option for "sanitizing " junk e-mails, this means that messages marked as junk will be displayed without images or other HTML formatting.
  5. If you have more than one email account, repeat the above steps for each account with which you want to use the Junk Mail Controls.
  6. When finished, click the "OK" button to exit the Junk Mail Controls dialog.

Training the Junk Mail Controls

To train the junk-mail filtering, you need to mark messages that you've received as either "junk" or "not junk", and it's important that you mark both types of messages rather than simply the ones that are junk. There are various ways that you can mark messages:

  • Right-click on a message and choose "Mark -> As Junk" (or "As Not Junk").
  • Select a message and from the "Message" menu, choose "Mark -> As Junk" (or "As Not Junk").
  • Select a message and click on the "Junk" icon on the toolbar.
  • Select a message and click on the "Junk Status" column in the message-list pane (which will show a small "Junk" icon if the message is marked as junk).
  • Select a message and type "J" (for Junk) or "Shift+J" (for not Junk).

Initially, the automatic junk mail detection for incoming messages might not be very accurate because it hasn't yet been trained very much, and you should thus be careful to check your Junk folder to see if any non-junk messages have been mistakenly detected as junk. After an initial training period, however, you should find that the Junk Mail Controls are very effectively detecting unwanted junk emails and keeping them from your Inbox.

Tweaking

The mail.adaptivefilters.junk_threshold preference is a threshold used to determine when messages are classified as junk. It defaults to 90 in version 1.5.0.4. Lowering this value will make it easier to recognize messages as spam, though it increases the risk that it will classify a legitimate message as spam. This might be useful if you get spam messages that it seems to have a tough time learning about. For example, messages that look like text but are actually clickable images.

You can change the preference using Tools -> Options -> Advanced -> General -> Config Editor. Enter junk in the Filter field to show only the preferences that contain junk in their name, and then double-click on mail.adaptivefilters.junk_threshold , enter 50 in the edit field and press the OK button. That will set it to 50.

The bayesian filter typically requires several hundred spam and several hundred legitimate messages in order to train itself to recognize spam. Its needs both, if you have a thousand spam messages but only a dozen legitimate messages it won't learn much. You don't need to keep the messages afterwards, it stores all of the information it needs as tokens in the training.dat file.

The Bayes Junk Tool can be used to examine and modify the training data. Sometimes it helps to get rid of tokens that are just as likely to occur in spam and legitimate messages, especially if the training data file gets very large. The web site also has several sets of training data that you can import or merge with your existing training data.

Bayesian filters are useful, but they're not always the best tool. Sometimes checking whether the message was sent by somebody on a DNSBL list is more effective. See this article for how to integrate SpamPal and the junk mail controls, and control which messages are downloaded.

Image Spam

Here is one way to use filters to help you weed out Image based spam. Create a new filter and set it to match all of the following:

Content-Type contains multipart/related From isn't in my address book (repeat this for each address book)

Then if all match, the message is sent to the Junk folder and marked junk.

Other information

  • The file that stores your custom training data for the Junk Mail Controls is called "training.dat". It is stored in your profile folder.
  • To view your Junk Mail Log, you follow "Tools -> Junk Mail Controls -> Logging", select "Junk Mail Log" and then use the mouse to 'grab' any corner and stretch it open till it expands and the area where any log data is will show.

See also

External links