I got 2 spam notifications :
---------
Hello,
Users have reported finding spam on your website. The following
content has been reported:
- 2 comments
Please review this reported spam by visiting the following url:
http://mysite/?q=/admin/spam/reported/comment
----------
First of all : the proposed URL isn't valid; the correct one should be :
http://mysite/?q=/admin/content/comment/list/reported
The proposed link leads to a 404.

Second, I deleted the spam comments, but Drupal keeps sending me mails saying that there's reported spam. How can this be resolved ?

Comments

darkcompanion’s picture

Status: Active » Fixed

FIXED by emptying the spam_reported table;

jeremy’s picture

Status: Fixed » Active

Leaving open -- the spam module should have emptied the table itself. There's a bug that needs to be fixed, when I find the time.

nancydru’s picture

I have seen this too. As a matter of fact, I still get notified even after the reported spam has aged off the table.

jody’s picture

yep, spam or no spam, it just keeps on sending those emails, I would love to find a way to get it to stop.

nancydru’s picture

Well, let's start here. Go into the Spam module and locate "function spam_cron". Scroll down just a bit and you'll see "clean expired spam logs." Change that code to:

  // clean expired spam logs
  $flush = variable_get('spam_flush_log_timer', 259200);
//  if ($flush = variable_get('spam_flush_log_timer', 259200)) {
    db_query('DELETE FROM {spam_log} WHERE timestamp < %d', time() - $flush);
    db_query('DELETE FROM {spam_reported} WHERE timestamp < %d', time() - $flush);
//  }
nancydru’s picture

Sometimes, the nuances of the php language escape me at first. Such as this case where an IF statement is both a comparison and and assignment statement. The IF statement needs to remain. All that is needed is the second db_query.

ahoeben’s picture

Status: Active » Needs review
StatusFileSize
new1.3 KB

Here's a patch, that includes nancyw's code above, but also removes reported spam records in hook_comment and hook_nodeapi

ahoeben’s picture

StatusFileSize
new1.28 KB

Previous patch was for 4.7. Here's the same for 5.x

jeremy’s picture

Status: Needs review » Fixed

Excellent, thanks for the patch! Committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)