Warning, /pim/kdepim-addons/kmail/plugins/common/kmail.antispamrc-HOWTO is written in an unsupported language. File is not indexed.
0001 0002 HOWTO for setting up a KMail antispam wizard configuration entry 0003 ================================================================ 0004 0005 This is a HOWTO for setting up a KMail antispam wizard configuration 0006 entry. Since this possibly is more developer related, I put this as 0007 text file into the source SVN. Possibly some of this should go to the 0008 user documentation. 0009 0010 I gathered the information from several mails and comments by Andreas 0011 Gungl, the original developer of the antispam wizard for KMail, and 0012 Ingo Kloecker. 0013 0014 When you have questions do not hesitate to ask me, Martin Steigerwald, 0015 Andreas or Ingo. 0016 0017 0018 Basics 0019 ------ 0020 0021 The configuration file for the KMail antispam wizard "kmail.antispamrc" 0022 consists of one entry for each spamfilter that the antispam wizard 0023 shall support. 0024 0025 At the beginning of the file in the section "General" the option "tools" 0026 specifies the count of configured spam filters. Increase that by one 0027 when you add a new entry: 0028 0029 [General] 0030 tools=11 0031 0032 0033 A spam filter configuration entry starts with a header like this: 0034 0035 [Spamtool #11] 0036 0037 0038 After this you place all the options for the spam filter. Please use 0039 an ordering that is similar to the other entries in the configuration 0040 file so that things are unified a bit. 0041 0042 0043 General options 0044 --------------- 0045 0046 - Ident: Specifies the internal identifier for the entry 0047 0048 - Version: Specifies the version of the entry (FIXME what is this for?) 0049 0050 - Priority: Specifies the priority of the filter. This value is used to 0051 place faster filters before the slower ones in the selection list. If the 0052 user chooses the top item, he gets the fastest filter. Provider sided 0053 "filters" (which produce headers tough) like the GMX filter have a prio 0054 at about 70, they are very fast as they don't consume time on the client 0055 side. Since CRM114 is almost as fast it gets 65 ;-). 0056 0057 - VisibleName: This is the name that is presented to the user 0058 0059 Or: 0060 0061 - HeadersOnly=yes: This is used for entries where KMail should just parse 0062 the mail headers for the spam score display (see Razor filter and below 0063 for spam score display details). 0064 0065 0066 Spam filter options 0067 ------------------- 0068 0069 These specify details about the spamfilter. 0070 0071 - Executable: Specifies a test whether the executable of the spamfilter 0072 can be started. You should provide something which can be run on the 0073 command line and returns [ $? -eq 0 ], i.e. it doesn't wait for any input 0074 etc. It usually make sense to assume the program in the $PATH, so you 0075 should better avoid /usr/bin. Set executable to "echo" for provider based 0076 filters. 0077 Example: Executable=crm -v | grep "CRM114" 0078 0079 - URL: URL to the homepage of the filter 0080 0081 - PipeFilterName: Name of the pipe-through filter used to send mails to the 0082 spamfilter and get them back with added spam filter headers. 0083 0084 - PipeCmdDetect: Command used to pipe the mail into. 0085 0086 - ExecCmdSpam: Command used to mark a mail as spam. 0087 0088 - ExecCmdHam: Command used to mark a mail as ham. 0089 0090 - SupportsBayes: Set to 1 if you have a spam filter that can learn. Only 0091 in this case KMail uses ExecCmdSpam and ExecCmdHam to let the user mark 0092 mail as ham or spam. 0093 0094 0095 Spam detection options 0096 ---------------------- 0097 0098 These specify how KMail shall detect whether a mail is spam, unsure or good. 0099 0100 - DetectionHeader: The name of the header where the spam filter puts the spam 0101 status of a mail into. 0102 0103 - DetectionPattern: The pattern the spam filter uses for marking a mail as 0104 spam. 0105 0106 - DetectionPattern2: The pattern the spam filter uses for marking a mail as 0107 unsure. Set "SupportsUnsure=1" when you use this. 0108 0109 - DetectionOnly: Don't pipe mails through the spam filter, but just use headers 0110 from outside, e.g. a provider based spam filter (See GMX). 0111 0112 - UseRegExp: Set to 1 if you need to use regular expressions in the detection 0113 patterns. KMail can operate faster when they are not required. 0114 0115 - SupportsUnsure: Set to 1 if you have a spam filter that supports 0116 classying mails as unsure to tell the user to train those. 0117 0118 0119 Spam score display 0120 ------------------ 0121 0122 Those regular expressions are used to extract the actual "spamicity" 0123 score and the threshold (i.e. the upper bound for non-spam) from 0124 SpamAssassin's ScoreHeader. The score and the threshold are then used 0125 for showing the spam status in the message header, i.e. the small 0126 colorbar. 0127 0128 You need to specify the following values: 0129 0130 - ScoreName: The name that will be shown in the message header. 0131 0132 - ScoreHeader: The message header containing the score value. 0133 0134 - ScoreType: The type of the score, cf. below. 0135 0136 - ScoreValueRegexp: A regular expression for extracting the score from 0137 the ScoreHeader. 0138 0139 - ScoreThresholdRegexp: A regular expression for extracting the threshold 0140 from the ScoreHeader; only needed for Adjusted type. Please set to 0141 nothing (ScoreThresholdRegexp=) if not needed. 0142 0143 0144 KMail supports the following ScoreType values: 0145 0146 - Bool: Simple Yes or No (Razor) 0147 0148 - Decimal: For probability between 0.0 and 1.0 (BogoFilter) 0149 0150 - Percentage: For straight percentages between 0.0 and 100.0 0151 0152 - Adjusted: Use this when we need to compare against a threshold 0153 (SpamAssasssin) 0154