Changes between Version 118 and Version 119 of SpamFilter
- Timestamp:
- Jan 16, 2016, 8:14:01 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SpamFilter
v118 v119 1 [[PageOutline(2-5,Contents,pullout)]] 2 1 3 = Trac Spam Filtering 2 [[PageOutline(2-3)]]3 4 4 5 This plugin allows different ways to reject contributions that contain spam. It requires at least Trac release 1.0. The source code for version 0.12 and before isn't updated any more, but is still available. … … 26 27 The Bayes filter when properly trained usually has the best detection rates and can be adapted quickly to new attacks by training the successful spam attempts. Akismet is a good second line of defense and it also uses adaptive algorithms. Training also helps the external service when a new type of attack begins. All other services are good to catch spam inserted through rather dumb methods, which is the majority. 27 28 28 A realistic goal is something like1 spam for every 10.000 attempts. However, for a new type spam wave, which happens once or twice a year, you have maybe 10-20 slip through at the start of the wave. False rejects should be in the order of one rejection per 1.000 or more successful submissions.29 A realistic goal is in the order of 1 spam for every 10.000 attempts. However, for a new type spam wave, which happens once or twice a year, you have maybe 10-20 slip through at the start of the wave. False rejects should be in the order of one rejection per 1.000 or more successful submissions. 29 30 30 31 == Supported Internal Filtering Strategies … … 44 45 If any of those regular expressions matches the submitters IP, the submission will be rejected. 45 46 46 Regular expressions are much too powerful for the simple task of matching an IP or an IP range, but to keep things simple for users the design is equal to the contentbased regular expressions. You can even specify full IPV4 addresses, where the dot has special meaning, as the match will work correctly. Only when matching partial addresses more care is needed.47 Regular expressions are too powerful for the simple task of matching an IP or an IP range, but to keep things simple for users the design is equal to the content-based regular expressions. You can even specify full IPV4 addresses, where the dot has special meaning, as the match will work correctly. Only when matching partial addresses more care is needed. 47 48 48 49 === IP Throttling … … 52 53 The maximum number of posts per hour is configured in [wiki:TracIni trac.ini]: 53 54 54 {{{ 55 #!ini 55 {{{#!ini 56 56 [spam-filter] 57 57 max_posts_by_ip = 5 … … 66 66 Currently the following captcha types are supported: 67 67 * Simple text captcha: Spam robots can bypass these, so they are not recommended. 68 * Image captcha 68 * Image captcha. 69 69 * External reCAPTCHA service: To use reCAPTCHA captcha method, you'll need to sign up at [https://www.google.com/recaptcha/intro/index.html] and set the keys at 'Captcha' administration page. 70 70 * External !KeyCaptcha service: To use !KeyCaptcha captcha method, you'll need to sign up at [http://www.keycaptcha.com/] and set the user id and key at 'Captcha' administration page. Note: requires JavaScript at the user side. 71 71 * External AreYouAHuman service: To use AreYouAHuman captcha method, you'll need to sign up at [http://www.areyouahuman.com/] and set the keys at 'Captcha' administration page. Note: requires JavaScript and Flash at the user side. 72 * External Mollom service. To use this method you need to sign up at [http://mollom.com/ Mollom web service] and set the keys at 'External' administration page (It's also a spam check service, [[#Mollom|see below]]).73 74 The captcha in spamfilter is a rejection system: they are only displayed to the user when otherwise a submission would be rejected as spam. In this case a successful solved captcha can increase the score of a transmission. If a transmission has too many spam points even a successfully solved captcha can't save it, ie the score is 30 and a captcha only removed 20 points.72 * External Mollom service. To use this method you need to sign up at [http://mollom.com/ Mollom web service] and set the keys at 'External' administration page. It's also a spam check service, [[#Mollom|see below]]. 73 74 The captcha in spamfilter is a rejection system: they are only displayed to the user when otherwise a submission would be rejected as spam. In this case a successfully solved captcha can increase the score of a transmission. If a transmission has too many spam points even a successfully solved captcha can't save it, ie the score is 30 and a captcha only removed 20 points. 75 75 76 76 === Bayes … … 113 113 The [source:plugins/1.0/spam-filter/tracspamfilter/filters/ip_blacklist.py ip_blacklist] filter uses the third-party Python library [http://www.dnspython.org/ dnspython] to make DNS requests to a configurable list of IP blacklist servers. 114 114 115 See [ http://spamlinks.net/filter-dnsbl-lists.htmSpamLinks DNS Lists] for a list of DNS based blacklists. A blacklist usable for this filter must return an IP for listed entries and no IP (NXDOMAIN) for unlisted entries.116 117 '''N OTE''': The submitters IP is sent to the configured servers.115 See [wikipedia:Comparison_of_DNS_blacklists SpamLinks DNS Lists] for a list of DNS based blacklists. A blacklist usable for this filter must return an IP for listed entries and no IP (NXDOMAIN) for unlisted entries. 116 117 '''Note''': The submitters IP is sent to the configured servers. 118 118 119 119 === URL Blacklisting … … 123 123 See [http://mxtoolbox.com/blacklists.aspx SpamLinks URL Lists] for a list of URL based blacklists. A blacklist usable for this filter must return an IP for listed entries and no IP (NXDOMAIN) for unlisted entries. 124 124 125 '''N OTE''': Domain links submitted in the transmission are sent to the configured servers.125 '''Note''': Domain links submitted in the transmission are sent to the configured servers. 126 126 127 127 === Akismet … … 131 131 The use of this filter requires a [http://www.wordpress.com Wordpress] API key. The API key is configured in the 'External' administration page. 132 132 133 '''N OTE''': Submitted content is sent to Akismet servers. Don't use this in private environments.133 '''Note''': Submitted content is sent to Akismet servers. Don't use this in private environments. 134 134 135 135 === Mollom … … 139 139 The use of this filter requires API keys. These API keys are configured in the 'External' administration page. 140 140 141 '''N OTE''': Submitted content is sent to Mollom servers. Don't use this in private environments.141 '''Note''': Submitted content is sent to Mollom servers. Don't use this in private environments. 142 142 143 143 === !StopForumSpam … … 147 147 Training this filter requires an API key. The API key is configured in the 'External' administration page. 148 148 149 '''N OTE''': Submitted username and IP is sent to !StopForumSpam servers. Don't use this in private environments.150 151 === !BlogSpam ===149 '''Note''': Submitted username and IP is sent to !StopForumSpam servers. Don't use this in private environments. 150 151 === !BlogSpam 152 152 153 153 The [source:plugins/1.0/spam-filter/tracspamfilter/filters/blogspam.py BlogSpam] filter uses the [http://blogspam.net/ BlogSpam web service] to check content for possible spam. … … 155 155 This service includes also DNS checks and services identical to the checks in this plugin. Be sure to set proper karma or these checks are counted twice. You also can disable individual checks in preferences. 156 156 157 '''N OTE''': Submitted content is sent to !BlogSpam servers. Don't use this in private environments.157 '''Note''': Submitted content is sent to !BlogSpam servers. Don't use this in private environments. 158 158 159 159 === HTTP:BL … … 163 163 The use of this filter requires a [http://www.projecthoneypot.org/httpbl_configure.php HTTP:BL] API key. The API key is configured in the 'External' administration page. 164 164 165 '''N OTE''': Submitters IP is sent to HTTP:BL servers.165 '''Note''': Submitters IP is sent to HTTP:BL servers. 166 166 167 167 === !BotScout … … 171 171 Using this filter requires an API key. The API key is configured in the 'External' administration page. 172 172 173 '''N OTE''': Submitted username and IP is sent to !BotScout servers. Don't use this in private environments.173 '''Note''': Submitted username and IP is sent to !BotScout servers. Don't use this in private environments. 174 174 175 175 === FSpamList … … 179 179 Using this filter requires an API key. The API key is configured in the 'External' administration page. 180 180 181 '''N OTE''': Submitted username and IP is sent to FSpamList servers. Don't use this in private environments.181 '''Note''': Submitted username and IP is sent to FSpamList servers. Don't use this in private environments. 182 182 183 183 == Get the Plugin 184 184 185 185 See the [wiki:TracPlugins#Requirements Trac plugin requirements] for instructions on installing `setuptools`. `Setuptools` includes the `easy_install` application, which you can use to install the SpamFilter by following the link on [pypi:TracSpamFilter PyPI]: 186 {{{ 187 #!sh 186 {{{#!sh 188 187 easy_install TracSpamFilter 189 188 }}} 190 189 191 190 You can also obtain the code from the Trac Subversion repository: 192 {{{ 193 #!sh 191 {{{#!sh 194 192 svn co http://svn.edgewall.com/repos/trac/plugins/1.0/spam-filter 195 193 }}} … … 206 204 207 205 If you install the plugin globally as described [wiki:TracPlugins#ForAllProjects here], you also need to enable it in the web administration or in [wiki:TracIni trac.ini]: 208 {{{ 209 #!ini 206 {{{#!ini 210 207 [components] 211 208 tracspamfilter.* = enabled … … 235 232 == SpamFilter and !AccountManager 236 233 237 If the [[http://trac-hacks.org/wiki/AccountManagerPlugin|AccountManager]] plugin is used in version 0.4 or better, then registrations can be checked for spam as well. To do so, the entry **!RegistrationFilterAdapter** needs to be added to key **register_check** in section **account-manager** of trac config. 234 If the [th:AccountManagerPlugin] is used in version 0.4 or better, then the registrations can be checked for spam as well. To do so, the entry **!RegistrationFilterAdapter** needs to be added to key **register_check** in section **account-manager** of the Trac configuration. 235 238 236 There are several ways to do this: 239 237 * Add it as first in the line: the filter then displays reject reasons in the spamfilter log. … … 253 251 254 252 == Known Issues 253 255 254 '''Attention''': dnspython v1.7 causes a massive slowdown of the Trac site. 256 255 [[TicketQuery(component=plugin/spamfilter,status=!closed)]]