Edgewall Software

Changes between Version 118 and Version 119 of SpamFilter


Ignore:
Timestamp:
Jan 16, 2016, 8:14:01 AM (8 years ago)
Author:
figaro
Comment:

Cosmetic changes, link updates

Legend:

Unmodified
Added
Removed
Modified
  • SpamFilter

    v118 v119  
     1[[PageOutline(2-5,Contents,pullout)]]
     2
    13= Trac Spam Filtering
    2 [[PageOutline(2-3)]]
    34
    45This 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.
     
    2627The 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.
    2728
    28 A realistic goal is something like 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.
     29A 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.
    2930
    3031== Supported Internal Filtering Strategies
     
    4445If any of those regular expressions matches the submitters IP, the submission will be rejected.
    4546
    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 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.
     47Regular 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.
    4748
    4849=== IP Throttling
     
    5253The maximum number of posts per hour is configured in [wiki:TracIni trac.ini]:
    5354
    54 {{{
    55 #!ini
     55{{{#!ini
    5656[spam-filter]
    5757max_posts_by_ip = 5
     
    6666Currently the following captcha types are supported:
    6767 * Simple text captcha: Spam robots can bypass these, so they are not recommended.
    68  * Image captcha
     68 * Image captcha.
    6969 * 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.
    7070 * 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.
    7171 * 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
     74The 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.
    7575
    7676=== Bayes
     
    113113The [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.
    114114
    115 See [http://spamlinks.net/filter-dnsbl-lists.htm 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.
     115See [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.
    118118
    119119=== URL Blacklisting
     
    123123See [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.
    124124
    125 '''NOTE''': 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.
    126126
    127127=== Akismet
     
    131131The use of this filter requires a [http://www.wordpress.com Wordpress] API key. The API key is configured in the 'External' administration page.
    132132
    133 '''NOTE''': 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.
    134134
    135135=== Mollom
     
    139139The use of this filter requires API keys. These API keys are configured in the 'External' administration page.
    140140
    141 '''NOTE''': 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.
    142142
    143143=== !StopForumSpam
     
    147147Training this filter requires an API key. The API key is configured in the 'External' administration page.
    148148
    149 '''NOTE''': 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
    152152
    153153The [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.
     
    155155This 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.
    156156
    157 '''NOTE''': 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.
    158158
    159159=== HTTP:BL
     
    163163The 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.
    164164
    165 '''NOTE''': Submitters IP is sent to HTTP:BL servers.
     165'''Note''': Submitters IP is sent to HTTP:BL servers.
    166166
    167167=== !BotScout
     
    171171Using this filter requires an API key. The API key is configured in the 'External' administration page.
    172172
    173 '''NOTE''': 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.
    174174
    175175=== FSpamList
     
    179179Using this filter requires an API key. The API key is configured in the 'External' administration page.
    180180
    181 '''NOTE''': 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.
    182182
    183183== Get the Plugin
    184184
    185185See 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
    188187easy_install TracSpamFilter
    189188}}}
    190189
    191190You can also obtain the code from the Trac Subversion repository:
    192 {{{
    193 #!sh
     191{{{#!sh
    194192svn co http://svn.edgewall.com/repos/trac/plugins/1.0/spam-filter
    195193}}}
     
    206204
    207205If 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
    210207[components]
    211208tracspamfilter.* = enabled
     
    235232== SpamFilter and !AccountManager
    236233
    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.
     234If 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
    238236There are several ways to do this:
    239237* Add it as first in the line: the filter then displays reject reasons in the spamfilter log.
     
    253251
    254252== Known Issues
     253
    255254'''Attention''': dnspython v1.7 causes a massive slowdown of the Trac site.
    256255[[TicketQuery(component=plugin/spamfilter,status=!closed)]]