Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Reject 'throw away'-email adresses for registration?  (Read 5870 times)

0 Members and 1 Guest are viewing this topic.

lamama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 404
Reject 'throw away'-email adresses for registration?
« on: April 12, 2006, 01:14:14 am »

Every now and then I have new registrations whith 'throw away'-email adresses like mailinator.com, spamgourmet.com or mytrashmail.com. Normally my coppermine runs with email activation and admin activation seems not suitable to me.

Is there a way (mod) to reject those adresses during the process of creating an account, maybe something like a blacklist?
« Last Edit: April 12, 2006, 08:48:05 pm by GauGau »
Logged

lamama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 404
Re: Reject 'throw away'-email adresses for registration?
« Reply #2 on: April 12, 2006, 02:22:20 am »

yeah, thanks. i searched, but used the wrong search phrases...
Logged

lamama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 404
Re: Reject 'throw away'-email adresses for registration?
« Reply #3 on: April 12, 2006, 02:39:27 am »

Sorry, but the linked Mod is missing a core feature: it restrics the number of allowed email-domains to exactly one. That's not exactly what I looked for  ::)

Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Reject 'throw away'-email adresses for registration?
« Reply #4 on: April 12, 2006, 05:39:46 am »

I wrote a mod to reject aol addresses. It could probably be edited to go through a list of addresses instead of just rejecting from one domain.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Reject 'throw away'-email adresses for registration?
« Reply #5 on: April 12, 2006, 05:49:40 am »

Oops. It turns out the mod I did was to reject aol addresses for ecard recipients. I'll look into doing it for registrations.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Reject 'throw away'-email adresses for registration?
« Reply #6 on: April 12, 2006, 06:14:43 am »

Here it is. You'll need to edit register.php

FIND:
Code: [Select]
    if (!eregi("^[_\.0-9a-z\-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$", $email)) $error .= '<li>' . $lang_register_php['err_invalid_email'];
REPLACE with:
Code: [Select]
$disallowed_domains = array('aol.com', 'blah.com', 'bleh.com');
list($email_userName, $email_domain) = split("@", $email); //from sitepoint.com
if (!eregi("^[_\.0-9a-z\-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$", $email)) {
$error .= '<li>' . $lang_register_php['err_invalid_email'];
}
if (in_array($email_domain, $disallowed_domains)) {
$error .= '<li>The email address domain is not allowed';
}

This could be improved upon by making the addresses configurable, and the error text internationalizable.
« Last Edit: April 12, 2006, 06:19:44 am by TranzNDance »
Logged

lamama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 404
Re: Reject 'throw away'-email adresses for registration?
« Reply #7 on: April 12, 2006, 08:28:57 pm »

Yeah, cool! It works!   :)
Big thanks!
Logged

lamama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 404
Re: Reject 'throw away'-email adresses for registration?
« Reply #8 on: April 12, 2006, 08:49:11 pm »

Here is a list of disposable email address-providers I found.

Code: [Select]
$disallowed_domains = array('bumpymail.com', 'centermail.com', 'centermail.net', 'discardmail.com', 'dodgeit.com', 'e4ward.com', 'emailias.com', 'fakeinformation.com', 'front14.org', 'ghosttexter.de', 'gishpuppy.com', 'jetable.net', 'kasmail.com', 'link2mail.net', 'mailexpire.com', 'mailinator.com', 'mailmoat.com', 'messagebeamer.de', 'mytrashmail.com', 'nervmich.net', 'netmails.net', 'netzidiot.de', 'nurfuerspam.de', 'privacy.net', 'punkass.com', 'sneakemail.com', 'sofort-mail.de', 'sogetthis.com', 'spam.la', 'spambob.com', 'spambob.net', 'spambob.org', 'spamex.com', 'spamgourmet.com', 'spamhole.com', 'spaminator.de', 'spammotel.com', 'spamtrail.com', 'trash-mail.de', 'trashmail.net', 'wuzup.net');
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.