I had previously investigated the idea of using SpamAssassin to check comments and decide whether or not they were spam.
Here are some of my test materials. The first is a PHP script, the other is a custom set of spamassassin scores.
<?php
$sender = "user@example.com";
$subject = "Comment";
$date = date("D, d M Y H:i:s O (T)");
$date_old = date("D, d M Y H:i:s O");
echo <<<EOF
Subject: $subject
Date: $date
From: www-data@example.com (www-data)
hi
hi
hi
hi
hi
EOF;
?>
Spamc settings appropriate for comments:
score MISSING_MID 0.0 score NO_RELAYS 0.0 score NO_RECEIVED 0.0
