Fighting Spam

When you have comments on your page, it's just a matter of time, the first bots try to use it to spam you. Komments comes with a build in spam detection.

Auto-delete

When a comment is detected as spam, the plugin will automatically delete it or, to say better, won't save it at all. You can change that behavior so that comments are only marked as spam, and you decide whether they should be deleted or not. In your config.php set the following option:

'mauricerenck.komments.spam.delete' => false

Now spam comments will appear in the table.

Fine tune

The plugin runs several checks to identify spam comments. Each check adds a value to the spam level. A value of 0 means "no spam" and a value of "100" means definitely spam.

You can set the sensibility to a number between 0 and 100. When a comment then reaches this spam level, it will be marked as spam. So if you want to be very strict, you could set it to 20:

'mauricerenck.komments.spam.sensibility' => 20

Or if you have the feeling you get too many false reports, set it higher:

'mauricerenck.komments.spam.sensibility' => 80

Block words and phrases

If you notice that spam comments always contain certain words or phrases, you can specifically configure them as spam-relevant. If they are found in the text, they increase the spam score by 10 (word) and 15 (phrase) points:

'mauricerenck.komments.spam.keywords' => ['buy', 'sale', 'cheap', 'discount', 'offer'],
'mauricerenck.komments.spam.phrases' => ['free trial', 'limited time offer', 'exclusive discount'],

Akismet

The plugin can use Akismet for spam protection. For privacy reasons, this is disabled by default. You can enable this, by setting the option to true and adding your Akismet API key:

'mauricerenck.komments.spam.akismet' => true,
'mauricerenck.komments.spam.akismet_api_key' => 'abc-def',

You have to create an Akismet account and create an API key: https://akismet.com/