Skip to content

Commit

Permalink
Updated disposable email checker to v1.1.1
Browse files Browse the repository at this point in the history
Here is the change log for v1.1.1:

2011.08.19  -  1.1.1
- 36 disposable forwarding email providers.
- 132 disposable trash email providers (24 new).
- 1 disposable shredder email provider.
- 42 disposable time bound email provider.
- 83 free email providers (1 new).
  • Loading branch information
vboctor committed Feb 25, 2012
1 parent fd34163 commit c55f351
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 47 deletions.
6 changes: 6 additions & 0 deletions library/disposable/changelog.txt
@@ -1,4 +1,10 @@
DisposableEmailChecker ChangeLog
2011.08.19 - 1.1.1
- 36 disposable forwarding email providers.
- 132 disposable trash email providers (24 new).
- 1 disposable shredder email provider.
- 42 disposable time bound email provider.
- 83 free email providers (1 new).

2008.04.13 - 1.1.0

Expand Down
88 changes: 53 additions & 35 deletions library/disposable/disposable.php
@@ -1,23 +1,16 @@
<?php
# This program is distributed under the terms and conditions of the LGPL
# See the README and LICENSE files for details

/**
* Disposable Email Checker - a static php based check for spam emails
* @copyright Copyright (C) 2007-2008 Victor Boctor
* @link http://www.mantisbt.org/
* @link http://www.futureware.biz/disposable
* @version 1.1.0-git - Release Date: 13-Apr-2008
* @package DisposableEmail
*/
# Disposable Email Checker - a static php based check for spam emails
# Copyright (C) 2007-2008 Victor Boctor

# This program is distributed under the terms and conditions of the LGPL
# See the README and LICENSE files for details

/**
* A class that checks an email address and provides some facts about whether
* it is a disposable, free web mail, etc. The data that is used to make
* such decision is static as part of the class implementation, hence
* avoiding a round trip to a remote service. This makes the class much
* more efficient in scenarios where performance is an issue.
* @package DisposableEmail
*/
class DisposableEmailChecker
{
Expand Down Expand Up @@ -69,20 +62,27 @@ class DisposableEmailChecker
'75hosting.net',
'75hosting.org',
'ajaxapp.net',
'amilegit.com',
'amiri.net',
'amiriindustries.com',
'anonymail.dk',
'bugmenot.com',
'anonymbox.com',
'bspamfree.org',
'bugmenot.com',
'buyusedlibrarybooks.org',
'deadaddress.com',
'discardmail.com',
'disposeamail.com',
'dispostable.com',
'dodgeit.com',
'dontsendmespam.de',
'emaildienst.de',
'emailmiser.com',
'emailthe.net',
'etranquil.com',
'etranquil.net',
'etranquil.org',
'fakeinbox.com',
'fastacura.com',
'fastchevy.com',
'fastchrysler.com',
Expand All @@ -106,54 +106,70 @@ class DisposableEmailChecker
'gowikitv.com',
'haltospam.com',
'ichimail.com',
'incognitomail.org',
'ipoo.org',
'killmail.net',
'klassmaster.com',
'link2mail.net',
'lortemail.dk',
'mailcatch.com',
'maileater.com',
'mailin8r.com',
'mailinator.com',
'mailinator.net',
'mailinator2.com',
'mailmetrash.com',
'mailnesia.com',
'mailquack.com',
'mailslapping.com',
'meltmail.com',
'mmmmail.com',
'mt2009.com',
'myspaceinc.com',
'myspaceinc.net',
'myspaceinc.org',
'myspacepimpedup.com',
'mytrashmail.com',
'nepwk.com',
'no-spam.hu',
'nobulk.com',
'noclickemail.com',
'nospamfor.us',
'nowmymail.com',
'oneoffemail.com',
'oneoffmail.com',
'oopi.org',
'ourklips.com',
'pimpedupmyspace.com',
'pookmail.com',
'rejectmail.com',
'recyclemail.dk',
'rejectmail.com',
'rklips.com',
'sharklasers.com',
'shortmail.net',
'sofort-mail.de',
'sogetthis.com',
'spam.la',
'spamavert.com',
'spambob.com',
'spambog.com',
'spambox.us',
'spamfree24.com',
'spamfree24.net',
'spamfree24.org',
'spaml.com',
'tempemail.net',
'tempinbox.com',
'tempomail.fr',
'temporaryinbox.com',
'thankyou2010.com',
'thisisnotmyrealemail.com',
'trash-mail.de',
'trash2009.com',
'trashdevil.com',
'trashdevil.de',
'trashmail.net',
'trashymail.com',
'turual.com',
'twinmail.de',
'upliftnow.com',
Expand All @@ -165,8 +181,9 @@ class DisposableEmailChecker
'wetrainbayarea.com',
'wetrainbayarea.org',
'whopy.com',
'willselfdestruct.com',
'whyspam.me',
'wilemail.com',
'willselfdestruct.com',
'xagloo.com',
'yopmail.com'
);
Expand Down Expand Up @@ -266,6 +283,7 @@ class DisposableEmailChecker
'pancakemail.com',
'ravemail.co.za',
'rediffmail.com',
'sapo.pt',
'starmail.co.za',
'talk21.com',
'thecricket.co.za',
Expand Down Expand Up @@ -311,7 +329,7 @@ class DisposableEmailChecker
* @param $p_email The email address to validate.
* @returns true: disposable, false: non-disposable.
*/
public static function is_disposable_email( $p_email ) {
function is_disposable_email( $p_email ) {
return (
DisposableEmailChecker::is_forwarding_email( $p_email ) ||
DisposableEmailChecker::is_trash_email( $p_email ) ||
Expand All @@ -321,42 +339,42 @@ public static function is_disposable_email( $p_email ) {

/**
* Determines if the email address is disposable email that forwards to
* users' email address. This is one of the best kind of disposable
* users' email address. This is one of the best kind of disposable
* addresses since emails end up in the user's inbox unless the user
* cancel the address.
*
* @param $p_email The email address to check.
* @returns true: disposable forwarding, false: otherwise.
*/
public static function is_forwarding_email( $p_email ) {
function is_forwarding_email( $p_email ) {
$t_domain = DisposableEmailChecker::_get_domain_from_address( $p_email );
return in_array( $t_domain, DisposableEmailChecker::$forwarding_domains_array );
}

/**
* Determines if the email address is trash email that doesn't forward to
* user's email address. This kind of address can be checked using a
* user's email address. This kind of address can be checked using a
* web page and no password is required for such check. Hence, data sent
* to such address is not protected. Typically users use these addresses
* to signup for a service, and then they never check it again.
*
* @param $p_email The email address to check.
* @returns true: disposable trash mail, false: otherwise.
*/
public static function is_trash_email( $p_email ) {
function is_trash_email( $p_email ) {
$t_domain = DisposableEmailChecker::_get_domain_from_address( $p_email );
return in_array( $t_domain, DisposableEmailChecker::$trash_domains_array );
}

/**
* Determines if the email address is a shredder email address. Shredder
* email address delete all received emails without forwarding them or
* email address delete all received emails without forwarding them or
* making them available for a user to check.
*
* @param $p_email The email address to check.
* @returns true: shredded disposable email, false: otherwise.
*/
public static function is_shredder_email( $p_email ) {
function is_shredder_email( $p_email ) {
$t_domain = DisposableEmailChecker::_get_domain_from_address( $p_email );
return in_array( $t_domain, DisposableEmailChecker::$shredder_domains_array );
}
Expand All @@ -370,10 +388,10 @@ public static function is_shredder_email( $p_email ) {
* @param $p_email The email address to check.
* @returns true: time bound disposable email, false: otherwise.
*/
public static function is_time_bound_email( $p_email ) {
function is_time_bound_email( $p_email ) {
$t_domain = DisposableEmailChecker::_get_domain_from_address( $p_email );
return in_array( $t_domain, DisposableEmailChecker::$time_bound_domains_array );
}
}

/**
* See is_open_domain() for details.
Expand All @@ -397,26 +415,26 @@ function is_free_email( $p_email ) {
* @param $p_email The email address to check.
* @returns true: open domain email, false: otherwise.
*/
public static function is_open_email( $p_email ) {
function is_open_email( $p_email ) {
$t_domain = DisposableEmailChecker::_get_domain_from_address( $p_email );
return in_array( $t_domain, DisposableEmailChecker::$open_domains_array );
}

/**
* A debugging function that takes in an email address and dumps out the
* details for such email.
*
* @param $p_email The email address to echo results for. This must be a
*
* @param $p_email The email address to echo results for. This must be a
* safe script (i.e. no javascript, etc).
*/
function echo_results( $p_email ) {
echo 'email address = ', htmlspecialchars( $p_email ), '<br />';
echo 'is_disposable_email = ', DisposableEmailChecker::is_disposable_email( $p_email ), '<br />';
echo 'is_forwarding_email = ', DisposableEmailChecker::is_forwarding_email( $p_email ), '<br />';
echo 'is_trash_email = ', DisposableEmailChecker::is_trash_email( $p_email ), '<br />';
echo 'is_time_bound_email = ', DisposableEmailChecker::is_time_bound_email( $p_email ), '<br />';
echo 'is_shredder_email = ', DisposableEmailChecker::is_shredder_email( $p_email ), '<br />';
echo 'is_free_email = ', DisposableEmailChecker::is_free_email( $p_email ), '<br />';
echo 'is_disposable_email = ', DisposableEmailChecker::is_disposable_email( $p_email ), '<br />';
echo 'is_forwarding_email = ', DisposableEmailChecker::is_forwarding_email( $p_email ), '<br />';
echo 'is_trash_email = ', DisposableEmailChecker::is_trash_email( $p_email ), '<br />';
echo 'is_time_bound_email = ', DisposableEmailChecker::is_time_bound_email( $p_email ), '<br />';
echo 'is_shredder_email = ', DisposableEmailChecker::is_shredder_email( $p_email ), '<br />';
echo 'is_free_email = ', DisposableEmailChecker::is_free_email( $p_email ), '<br />';
}

/**
Expand All @@ -442,12 +460,12 @@ function echo_stats() {
* @param $p_email The email address to extra the domain from.
* @returns The lower case domain or empty string if email not valid.
*/
private static function _get_domain_from_address( $p_email ) {
function _get_domain_from_address( $p_email ) {
$t_domain_pos = strpos( $p_email, '@' );
if ( $t_domain_pos === false ) {
return '';
}

return strtolower( substr( $p_email, $t_domain_pos + 1 ) );
}
}
}
4 changes: 3 additions & 1 deletion library/disposable/license.txt
Expand Up @@ -146,7 +146,7 @@ such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.

1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
Expand Down Expand Up @@ -500,3 +500,5 @@ necessary. Here is a sample; alter the names:
Ty Coon, President of Vice

That's all there is to it!


22 changes: 11 additions & 11 deletions library/disposable/readme.txt
Expand Up @@ -9,7 +9,7 @@ if users use disposable addresses, then they can potentially bypass the time
limit. Other applications may use it to make sure that they have valid emails
that they can use for future correspondence.

In addition to providing a way to detect disposable addresses, this library
In addition to providing a way to detect disposable addresses, this library
also provides a way to classify these in several categories. Some applications
may decide to accept some of these categories but not the other. This provides
a great flexibility for each application to block the cases that doesn't work
Expand All @@ -21,21 +21,21 @@ Categories of disposable address

Shredder Addresses - These are not really common, some other types end up becoming
a shredder emails, but these ones starts as such. Shredder email addresses
delete all emails that are sent to it without storing them, forwarding them,
or making them available to the user that created the address. They are
delete all emails that are sent to it without storing them, forwarding them,
or making them available to the user that created the address. They are
typically used in scenarios where users are required to provide a valid email
address but they are not expecting any valuable data or signup activation link
to be sent to it.

Forwarding Addresses - These are pretty common. In this case users define a
disposable email address that forwards to their real address. At any point in
time they may decide to deactivate this email address. Some of these may still
accept the emails as if they are valid, but it is not forwarded anymore, and
accept the emails as if they are valid, but it is not forwarded anymore, and
hence becoming a shredder address. Some of these allow users to provision a
certain duration or number of emails after which the address expires.

Time Bound Addresses - These are a special kind of forwarding addresses that
expire after a time duration that is configured by the user. After such
expire after a time duration that is configured by the user. After such
duration the address becomes a shredder address. This duration is typically
enough for a user to do the transaction that they required the address for.
For example, signup for a service, do a transaction with a shop, etc.
Expand All @@ -50,9 +50,9 @@ disposable. Blocking these is likely to block a lot of legitimate users.
How Disposable Addresses are detected?
--------------------------------------

This library has a list of rules that are used to determine whether an address
is disposable or not. The library does not connect to the Internet to determine
the kind or the validity of the address. The library may be enhanced in the
This library has a list of rules that are used to determine whether an address
is disposable or not. The library does not connect to the Internet to determine
the kind or the validity of the address. The library may be enhanced in the
future to provide applications with ways of explicitly requiring online checks.


Expand All @@ -76,13 +76,13 @@ Versioning Scheme

The versioning for this library is formatted as follows "1.2.3".

(1) This is the majro version which will change when there are major changes
(1) This is the majro version which will change when there are major changes
or re-implementation.

(2) This is the minor version which will change when the APIs changes.
Most of the time these won't be breaking changes, but sometimes they
may be.

(3) This is the data version which is the only one changed in releases that
just update the rules that are used to determine that an email address
is disposable.

0 comments on commit c55f351

Please sign in to comment.