On Fri, Dec 3, 2010 at 3:01 PM, Clayton
<ccornell(a)openoffice.org> wrote:
I'm busy tidying up spam on the OOoWiki on a
fairly regular basis. The
OOoWiki uses several tools to block/stop spammers (BadBehavior, the spam
RegEx etc.)... it's working most of the time, but the spammers still get
in and vandalize pages several times per week. I've been poking around
and discovered that a lot of the spammers (who create an account just to
post a URL link) are using Mailinator dot com to create a one-time-use
throwaway email address to receive the Wiki user authentication email.
Is there any practical way of blocking new users from using specific
services like Mailinator? Is there a better way of dealing with
situations like this?
C.
http://www.mediawiki.org/wiki/Manual:Hooks/AbortNewAccount
might work, dont know exactly what the docu means by 'incomplete'
pesudocodey:
$wgHooks['AbortNewAccount'][] = 'fnMyHook';
function fnMyHook( $user, $message ) {
if( $user->getEmail() =~ /mailinator/ ) {
$message = 'mailinator iz verbotten';
return false;
}
}
That's a bit perlish ;)
Try this instead, Clayton:
$wgHooks['AbortNewAccount'][] = 'noMailinator';
function noMailinator( $user, &$message ) {
if( !preg_match( '/(a)(mailinator|binkmail).com$/'m$/', $user->getEmail() ) {
$message = 'No mailinator emails, please';
return false;
}
return true;
}
Another option would be the isValidEmailAddr hook.