Extension:CheckEmailAddress

The CheckEmailAddress extension checks the email-address during the registration process. It aims at preventing spammers from creating an account on wikis which require email confirmation. CheckEmailAddress basically provides two features:
 * check the domain of the email-address:
 * If it matches a certain provider-address, e.g. a known trash-email-address, account creation fails, and the user is asked to register with a different email-address.


 * check the name of the email-address:
 * If the name meets certain criteria, account creation fails, and the user is asked to provide a different email-address.

Download instructions
Please copy and paste the code found below and place it in Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php:

Create a textfile "Blacklistfile.txt". Fill in domains of email-addresses that are known as trash- or once-only-mails, e.g. mailinator.com. Just write the domains you want to disable one below the other, without "@". It should look something like this: mailinator.com spoofmail.de ... Save Blacklistfile.txt in your root. Note: the root directory of your MediaWiki installation is the same directory that holds LocalSettings.php.

$wgCheckEmailAddressDomainSources
This is a simple array that informs what type the source is and which sourcefile is used. At the moment only "CEASRC_FILE" is possible as "type". Point "src" to the file containing the email-addresses.

$wgCheckEmailAddressNameSigns
This array defines the signs and their limit in the name-part of the email-address, i.e. in the part before "@". Since this variable is an array of arrays, you can name several signs with different limits. If for example known spammers keep registring with characteristic email-names, you can now exclude them by patterns. In the configuration given above, email-names are searched for dots ("."). If they count equal or more than five, account creation fails.

Code
CheckEmailAddress consists of three files.

Feedback
Feedback is greatly appreciated. Give me a call when you have improvements in mind, have identified certain spam-name-patterns, or have done some internationalization.