The MU forums have moved to WordPress.org

Banned Email Domains have no effect (5 posts)

  1. thkouk
    Member
    Posted 13 years ago #

    Hi, I am getting lots of spam registration from certain email domains. I have registered them in “Banned Email Domains” with no effect. Bots keep coming from that certain domains all the time. I use the latest WPMU with the buddypress plugin.

    Here is my banned list:

    pprotect.net
    memoryfoamking.com
    seofriends.info
    yournhollow.info
    cheapparallelsad.info
    auctiondiscount.info
    shop.info
    storemarket.info
    orderstore.info
    storeshop.info
    auctionorder.info
    dealssave.com
    fairstore.info
    dealssave.com
    revitolantiwrinkle.com
    realestatecrusade.com
    johnnyjohnsonblog.info
    thewebtrafficguide.com
    freesleepaid.net
    fcarpet.com
    fyimotorcycle.com
    getprofessionalbusinesscards.com
    appreciateone.com
    flycreditcard.com
    savemytimeapps.com
    hotvideogamerentals.com
    gapinsurances.com
    photographyi.com
    discountperfumecatalog.com
    camelhairmurals.com
    internetcasinos123.com
    foraudio.com
    charmedanddangerousband.com
    mysoftwareorganizer.com
    criminaljusticezone.com
    black-hat-seo.org
    stampfreemail.com
    supermailpro.com
    bestmailonline.com
    junklessmail.com
    bloglory.com
    homemailpro.com
    sieuthiraovat.com
    163.com
    emaildesechable.info
    msnadults.info
    sqlscrib.com
    mcsescribe.com
    gbebook.com
    yn8.de
    foster-kittens.com
    126.com
    stuffsoft.com
    sylter.net
    exelliart.de

    bestmailonline.com keep bringing me about 5 spammers /day

    Any ideas?

  2. tdjcbe
    Member
    Posted 13 years ago #

    I noticed that you included the buddypress tag on your post here. That's a known issue with buddypress:

    http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/fighting-splogs/?topic_page=1&num=15

    It's an older thread on the topic but I can't find a newer one on it. Not sure what the exact status is.

  3. andrea_r
    Moderator
    Posted 13 years ago #

    with the buddypress plugin

    Yep, there's the kicker. Please go search the BP forums. BP does its own registration and thus anything on the mu side gets skipped.

  4. thkouk
    Member
    Posted 13 years ago #

    OK, I know this isn't good practice but I couldn't stand the dozens of spam registration from the very same domains each day. So I edited the bp-core-signup.php file and added the missing lines that that can be found in the is_email_address_unsafe() function of wpmu-functions.php

    My code looks something like that now and it prevent spam registrations from the domains I ban:

    $limited_email_domains = get_site_option( 'limited_email_domains', 'buddypress' );
    
    	if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) {
    		$emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
    
    		if ( in_array( $emaildomain, (array)$limited_email_domains ) == false )
    			$errors->add( 'user_email', __( 'Sorry, that email address is not allowed!', 'buddypress' ) );
    	}
    
    	//thkouk apply banned domains rule
    
    	$banned_names = get_site_option( "banned_email_domains" );
    	if ( is_array( $banned_names ) && empty( $banned_names ) == false ) {
    		$email_domain = strtolower( substr( $user_email, 1 + strpos( $user_email, '@' ) ) );
    		foreach( (array) $banned_names as $banned_domain ) {
    		    if( $banned_domain == '' )
    		        continue;
    		    if (strstr( $email_domain, $banned_domain ) || (strstr( $banned_domain, '/' ) && preg_match( $banned_domain, $email_domain )))
    		    	$errors->add( 'user_email', __( 'Sorry, that email address is not allowed (banned domain)!', 'buddypress' ) );
    		}
    	    }

    I really don't understand why this piece of WPMU code isn't there to the default BP code

  5. andrea_r
    Moderator
    Posted 13 years ago #

    Take it to the BP devs, please. They have their own trac system.

About this Topic