1

Tuesday 14th July 2009

Trac SpamFilter Plugin

My repository trac instance has recently attracted the interest of a pill-spammer, so I installed trac-spamfilter-plugin with a view to making life awkward for the spammer. Whilst it was easy enough to install, I had a few issues with it.

This latter problem turned out to be due to the (default) assumption by the SpamFilter plugin that authenticated users are to be trusted, i.e. not to have their submissions vetted by the spam filter. This assumption doesn't hold true when, as in my case, the AccountManager plugin is used to enable users to register themselves. The spammer was registering himself (or herself) and using the newly-created account to spam the wiki. This behaviour can be turned off, but not using the Admin pages in a browser. Instead, the following option needs to be added in the [spam-filter] section of trac.ini:

[spam-filter]
trust_authenticated = false

It's also necessary to make test submissions from an account that doesn't have TRAC_ADMIN permission - admins bypass the spam filter too, and that can't be turned off.

Fedora Project

Local Packages