Unfortunately, whilst phpBB3 allows you to have new registrations and posts, checked automatically against Spamhaus/SpamCop (See ACP > Security Settings > Check IP against DNS Blackhole List:), it doesn't allow the others, and has way too many F/P's due to it's checking the CBL aswell.
Whilst this one doesn't currently allow you to have users checked before allowing their posts to go through (I'm working on that), it does allow you to check new registrations against the databases used by Check Spammers, and have an e-mail fired to you whenever a user is blocked.
File: /includes/functions_user.php
Find: (approx line #1358)
Code: Select all
// ... fast checks first.
if (strpos($username, '"') !== false || strpos($username, '"') !== false || empty($clean_username))
{
return 'INVALID_CHARS';
}
$mbstring = $pcre = false;
Add AFTER
Code: Select all
/// BEGIN SPAM MOD
$email = request_var('email', '');
$ip = $_SERVER['REMOTE_ADDR'];
$fspamcheck = file_get_contents('http://temerc.com/Check_Spammers/check_spammers_plain.php?name='.str_replace(' ', '%20', $username).'&email='.$email.'&ip='.$ip);
if (strpos($fspamcheck, 'TRUE') !==False) {
// Notify admin via e-mail
$blockedby = str_replace(' TRUE', '', $fspamcheck);
$blockedby = str_replace(' ', ' & ', $blockedby);
$msg = 'The following was blocked by the '.$blockedby.' filter<br><br>Username: '.$username.'<br><br>Email: '.$email.'<br><br>IP: '.$ip;
$to = "your@email.addr";
$from = "nobody@".$_SERVER['SERVER_NAME'];
$subject = "Spammer blocked by hpHosts Spam filter";
$headers = "MIME-Versin: 1.0\r\n" .
"Content-type: text/html; charset=ISO-8859-1; format=flowed\r\n" .
"Content-Transfer-Encoding: 8bit\r\n" .
"From: " . $from . "\r\n" .
"X-Mailer: hpHosts Spam Filter";
mail($to, $subject, $msg, $headers);
// Notify user
return 'Your registration has been blocked by our <a href="http://temerc.com/Check_Spammers/">spam filter</a>. Please either try again or contact an administrator';
die();
}
/// END SPAM MOD
You'll need to download the Check Spammers file, and place the files on your server.
An example of the e-mail you will receive is;
Code: Select all
The following was blocked by the fSpamlist & StopForumSpam filter
Username: embormbeteoma
Email: soovtovichsofttwtest@gmail.com
IP: 212.95.54.36