antispam-bee icon indicating copy to clipboard operation
antispam-bee copied to clipboard

Replace/extend "delete after X days" option with "delete after X comments"

Open schlessera opened this issue 3 years ago • 6 comments

We currently have an option to delete stored spammed comments we use for improving the spam detection after a set amount of days.

However, the number of days is not a meaningful metric for deciding on this. We want to have the highest amount of spam for improving detection while not endangering the DB storage space.

On a very low traffic site, 30 days worth of spam comments might be a single comment, whereas a high traffic site might be completely filled up after 30 days.

It would make more sense to control the storage space by the number of stored spam comments instead. This optimizing for a large pool of stored spam comments to help improve detection while ensuring we have a hard limit on the maximum space requirement.

schlessera avatar Aug 25 '20 14:08 schlessera

This is a great idea!

How do we do the migration from the old day based setting?

Here is an idea for a migration path:

If the day setting is used, we could add the number setting as an additional setting and check both. If one of the conditions is triggered we delete the comment.

If the day setting is not used, we could hide it and just display the new setting.

After some time and with at least two upgrade notices (one for the introduction and one for the removing) we could remove the day based setting.

Feedback welcome!

Zodiac1978 avatar Aug 27 '20 12:08 Zodiac1978

Very much in favor of this idea and Torstens migration path!

krafit avatar Jan 01 '21 09:01 krafit

Once we'll remove the day setting: should we just disable the new setting by default or set a sensible default value (maybe even based upon the previous setting). However: I'd love to see this in 2.10 🥳

krafit avatar Jan 01 '21 09:01 krafit

What about a combination of both?

Delete after X days and/or X comments

pfefferle avatar Jun 24 '21 09:06 pfefferle

+1 for both

Storage limit is a valid point. But there is no real benefit in storing old spam on low-traffic sites, as patterns change. 100 comments should not yield any storage issues, but with <1 comment per week that’s already >2 years. Setting a limit of 5 however is not beneficial, if one day spammers start to target the site, s.t. we only capture the last 10 Minutes from that point on.

stklcode avatar May 17 '22 09:05 stklcode

I also think both options would be good

florianbrinkmann avatar May 17 '22 10:05 florianbrinkmann