KMail does not have a built-in spam detection solution: the developers believe using external, but specialized, tools is the better approach. KMail uses these tools through its flexible filter architecture. The Anti-Spam Wizard helps you with the initial filter setup.
It will give you some choices about how you want the spam filtering to be set up. Afterwards it will automatically create the appropriate filter rules.
It can only initially set up the filters for you; and it will provide a standard setup. Manual modifications in existing filters are not considered. Instead, these filters are overwritten by the wizard.
You can activate the wizard via ->.
The wizard scans for known anti-spam tools on your computer. It is as well possible to use results of spam checks made by your provider by evaluating some header information which has been added to the messages. You can let the wizard prepare KMail to use one or many of them in parallel. However, note that anti-spam tool operations are usually time consuming. KMail can appear to be frozen during the scan of the messages for spam, you may encounter problems with the responsiveness of KMail. Please consider deleting the filter rules created by the wizard if the filtering becomes too slow for you. Here are some recommendations regarding the supported tools:
Bogofilter is a bayesian filter, that means it's spam detection relies on an initial training phase. On the other hand, it's a pretty fast tool. That's why it is recommended to be used by people which primarily want to have a fast spam detection, and which don't worry about the little training in the beginning before the detection rate increases significantly.
SpamAssassin is a pretty complex tool to fight against spam. Although it's behavior depends heavily on it's configuration, that tool can detect spam quite well without any training. However, scanning a message takes a little longer compared to pure bayesian filters. Let's say, it's not the tool of choice for people without some background information about SpamAssassin's capabilities.
Perhaps not so often used until distributions pick it up. It's clearly a tool for specialists.
Given that you get your mail via the GMX freemail provider, your messages are scanned for spam. The result of that process is documented in a special header field of each message. It's possible to use the content of this header field to sort out spam. There is no slowdown in the filtering if only this tool is used, as the messages have already been processed.
Here are the details of how the wizard works: KMail can use several external tools to detect spam messages; it will try to automatically find out which of those tools are installed on your box and will show you these tools in a list. The list is ordered by the average speed of the filtering process of the tools. You can mark the tools which you want to be used by KMail to detect spam. Of course, you can close the wizard, install a tool, and restart the wizard again.
If you have marked at least one tool, KMail is able to provide filters which allow the classification of the messages as spam or not spam. It will also provide actions to let you manually classify messages. These actions will be available via the menu and via toolbar icons. If any of the tools you selected support Bayesian filtering (i.e. a method to detect spam based on statistical analysis of the messages) then these messages are not only marked but additionally transfered to the tools to let them learn so they can improve their detection rate.
On the second page, there you will be able to select some additional actions to be done in KMail with regard to spam messages: if you want messages detected as spam to be moved into a certain folder, please select the appropriate folder and mark the Move known spam to: option; if messages detected as spam should additionally be marked as read, then mark the Mark detected spam messages as read option.
Having checked at least one of the available tools will allow you to let the wizard finish the filter setup. The wizard will not take any modifications in existing filters formerly created by the wizard into consideration but will either append new filters or replace existing filters in any case; you may want to inspect the result of this process in the Filter Dialog. The wizard will also create toolbar buttons for marking messages as spam or as ham; keep in mind that classifying messages as spam will also move those messages to the folder you had specified for spam messages, if you haven't deselected the appropriate option.
The wizard uses information stored in a special configuration file named
kmail.antispamrc
(stored in the global or local KDE
config directory). It will first check the global config file and then the local
config file: if the local config file contains entries with higher (newer)
version numbers per-tool the configuration data from the local file for that
tool is used; that way, both administrators and users can update the
wizard configuration.
The local detection of spam messages is achieved by creating pipe through actions per-tool within a special filter. Another filter contains rules to check for detected spam messages and actions to mark them and (optionally, depending on the choice in the wizard) to move them into a folder. Both filters are configured to be applied on incoming messages and on manual filtering.
Two filters are needed for the classification of ham and spam. They contain actions to mark the messages appropriately. As mentioned above, the filter for classification as spam can have another action to move the message into a predefined folder. If the selected tools support Bayesian filtering, the wizard will create additional filter actions to pass the messages to the tools (via execute command actions) in the appropriate learn mode.
If you want to fine-tune the filtering process, you might be interested in the chapter about Filter Optimization.
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team