Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

#10195 closed enhancement (fixed)

Allow configuring the timeout for spam detection services

Reported by: Remy Blank Owned by: Dirk Stöcker
Priority: normal Milestone: plugin - spam-filter
Component: plugin/spamfilter Version:
Severity: normal Keywords: spam
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

There's currently a spam surge on t.e.o. Most of the submissions are caught, except a few, like the following:

/wiki/WikiFormatting 	no Bobbi 	130.88.90.208 	11 	2011-05-23T14:56:26+01:00

    * BayesianFilterStrategy (8): SpamBayes determined spam probability of 24.13%
    * SessionFilterStrategy (3): Existing session found

    That saves me. Thakns for being so sensible! That saves me. Thakns for ...

All the entries that were caught are detected by at least one spam detection service.

Is it possible that this entry wasn't caught due to a timeout of the spam detection service? If so, would it make sense to be able to configure the timeout in trac.ini (currently it's hardcoded to 3 seconds)?

Attachments (0)

Change History (6)

comment:1 by Dirk Stöcker, 14 years ago

Could you update the plugin first. There have been improvements regarding error handling lately (especially with BlogSpam).

comment:2 by Dirk Stöcker, 14 years ago

Resolution: cantfix
Status: newclosed

Issue is mainly that Spambayes does catch these with very low score and the other services don't catch this 100% as well. A bit of training will probably help here. Updating would nevertheless be a good idea.

comment:3 by Remy Blank, 14 years ago

Resolution: cantfix
Status: closedreopened

I have just updated the plugin to the latest version.

The strange thing is, sometimes two identical submissions aren't treated the same: one is accepted, and the other is rejected, thanks to one of the spam detection services triggering. That's why I suspect we got a timeout on one of the submissions. Are timeouts logged? If not, it may be a nice addition.

Unrelated to this issue, we see this traceback each time a Trac process is started:

[pid 25663 139929385522912] 2011-05-23 09:20:23,279 Trac[loader] ERROR: Skipping "spamfilter.defensio = tracspamfilter.filters.defensio":
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/loader.py", line 68, in _load_eggs
    entry.load(require=True)
  File "/usr/local/virtualenv/0.13-stable/lib/python2.5/site-packages/setuptools-0.6c9-py2.5.egg/pkg_resources.py", line 1913, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/local/virtualenv/0.13-stable/lib/python2.5/site-packages/TracSpamFilter-0.4.6dev_r10541-py2.5.egg/tracspamfilter/filters/defensio.py", line 29, in <module>
    import json
ImportError: No module named json

You may want to catch the ImportError in that module and disable the component if json isn't available.

comment:4 by Dirk Stöcker, 14 years ago

The detection for most external services also depend on IP address and the headers. They differ usually.

Can you add the json check? I can't test it, as I have no python < 2.6. Shouldn't it be possibly to add the check in setup.py?

comment:5 by Remy Blank, 14 years ago

Yes, I remember that they differed in the IP address.

Testing without json is easy, just temporarily add a raise ImportError() right before the import json.

comment:6 by Dirk Stöcker, 14 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in r10700.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Dirk Stöcker.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Dirk Stöcker to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.