• I have a problem with my blog because a lot of emails are sent to one of these emails (different account some domain):

    • gemmasmith.co.uk
    • jenniferlawrence.uk
    • b-mail.online
    • katykahn.co.uk
    • sarahconner.co.uk
    • marymarshall.co.uk

    I don’t understand why the blog is sending all those emails. So, I tried to block the registration for those domains. First, I added in the function.php of the theme the following code

    // prevent user registration in wordpress from specific domain
    function wpcs_disable_email_domain ( $errors, $sanitized_user_login, $user_email ) {
        list( $email_user, $email_domain ) = explode( '@', $user_email );
        if ( strpos($email_domain, 'b-mail.online') != false || 
    		 strpos($email_domain, 'dynainbox.com') != false || 
    		 strpos($email_domain, 'gemmasmith.co.uk') != false ||
    		 strpos($email_domain, 'marymarshall.co.uk') != false ||
    		 strpos($email_domain, 'katykahn.co.uk') != false || 
    		 strpos($email_domain, 'roastedtastyfood.com') != false
    	) {
            $errors->add( 'email_error', __( '<strong>ERROR</strong>: Domain not allowed.', 'my_domain' ) );
        }
        return $errors;
    }
    add_filter( 'registration_errors', 'wpcs_disable_email_domain', 10, 3 );

    but the emails are still sending. Then, I tried different plug-in like Ban Hammer or WP Security. Nothing.

    Could you help me to understand how to block all those emails to these domains?

    Thank you advance,
    Enrico

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • What are these emails?

    Please examine the emails critically (including the email’s header).

    1) Are they normal WordPress registration emails? Or spam from your contact form?

    2) Are the emails even originating from your server? Or is your domain merely being spoofed?

    Thread Starter erossini

    (@erossini)

    Thank you for your reply.

    Definitely the emails are from my mail server. This is an example

    This message was created automatically by the mail system (ecelerity).
    
    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:
    
    >>> [email protected] (while not connected): 554 5.4.5 [internal] Delivery not attempted (message expired)

    This message is merely the notification of a failed email. As you noted, this is from your mail server, and nothing to do with WordPress.

    But what’s in the ORIGINAL email that was to be sent that couldn’t be delivered?

    Is that a WordPress registration email?

    olomosis

    (@olomosis)

    Dear Team,

    I have also been experiencing the same issues. Below is one of such messages:

    This message was created automatically by mail delivery software.

    A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:
    [email protected]
    all hosts for ‘ax101-7.gemmasmith.co.uk’ have been failing for a long time (and retry time not reached)

    When i checked the request message header, it was requesting my ‘site login details’
    How can i block this specific domain from registering or accessing the sit?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Block specific domain’ is closed to new replies.