Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Block Email Manager [Support Page]

    I was getting spam and others thinking I need there skills! I have info for sharing links, ads so on, but that wasn't what they wanted... They made the list instead.

    Block Email manager is a basic, no thrills manager to place unwanted human spammers on a list. Once on the list, they can no longer sign in if they had an account, or create account, or use any of the forms! I decided on a text list instead of a database table so that the list could be offered up to search engines or others looking for a black list. That's how I started mine, downloaded a black list.

    I also wanted the ability to edit the list right from admin and not have to hand edit and upload anything. Although you could if you wanted to. Its just a simple, one line text file with each address separated by a comma.

    I've been using this blocker for over 8 years from ZC1.3.8 on up. Just worked out some kinks for PHP7 and tested all the way to ZC 1.5.5d.. Tested with PHP5.6 and 7.0 only, but it was working with PHP5.2 some time back.

    I've changed the code some to make it easer adding to other forms. One thing I may change yet is how the domain testing is done.

    Why an email black list? Why not, even GMail has blacklists. It's just another tool in the box.

    Once approved it should show in the admin plugins section. I'll need to do a fix once its posted for the update check to work, for now its off until I get an ID number.

    On my site I block any email with the domain of ADDME.com if you wish to see it live! Just don't make the list!!
    Dave
    Always forward thinking... Lost my mind!

  2. #2
    Join Date
    Jan 2007
    Location
    Mount Maunganui, New Zealand
    Posts
    419
    Plugin Contributions
    0

    Default Re: Block Email Manager [Support Page]

    Thanks so much for creating this.
    I've installed it on 1.54 and have it showing in admin.
    I have blocked a spam username '[email protected]' and it shows in the banned_email.txt file now.
    However I'm still able to create an account with that email.
    Any idea what I've missed?

  3. #3
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Block Email Manager [Support Page]

    Quote Originally Posted by mcpisik View Post
    Thanks so much for creating this.
    I've installed it on 1.54 and have it showing in admin.
    I have blocked a spam username '[email protected]' and it shows in the banned_email.txt file now.
    However I'm still able to create an account with that email.
    Any idea what I've missed?
    interesting... in testing I see there is something going on... Let me work on it and get back... I've been meaning to update this mod, just been swamped with things..
    Dave
    Always forward thinking... Lost my mind!

  4. #4
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Block Email Manager [Support Page]

    Just sent in an update to fix the bug.

    Update to add ZC1.5.6 file changes.
    Fix bug in create account file.
    Updated block lists with my current winners.
    Tested, and in use with ZC1.5.6b and PHP 7.3.x
    The error in includes/modules/YOUR_TEMPLATE/create_account.php was in its logic..
    change this line
    Code:
    elseif (($zc_validate_email == TRUE) && (BLOCK_EMAIL_STATUS == 'true')) {
    to this
    Code:
    elseif (($error == false) && (BLOCK_EMAIL_STATUS == 'true')) {
    Only needed in the create_account, other pages are correct as is.
    Dave
    Always forward thinking... Lost my mind!

  5. #5
    Join Date
    Jan 2007
    Location
    Mount Maunganui, New Zealand
    Posts
    419
    Plugin Contributions
    0

    Default Re: Block Email Manager [Support Page]

    Thanks for looking into it.
    I've made the change, but can still create an account.
    I'm using 1.5.4 and note your talk of the updates were for later versions.

    I have yandex.com in my banned_domain.txt and [email protected] in my banned_email.txt
    But it still allows me to use [email protected] as a new account.

    Could you peek at me code to see if your suggested code change is entered correctly or if I have errors?

    Code:
        $error = true;
        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
      } elseif (($error == false) && (BLOCK_EMAIL_STATUS == 'true')) {   //added for blockemail mod
             if (zc_validate_blockemail($email_address) == false) {  
          $error = true;
          $messageStack->add('create_account', ENTRY_BLOCKEMAIL_ADDRESS_ACCOUNT_ERROR);  
          }
        } else {  
        $check_email_query = "select count(*) as total
                                from " . TABLE_CUSTOMERS . "
                                where customers_email_address = '" . zen_db_input($email_address) . "'";
        $check_email = $db->Execute($check_email_query);

  6. #6
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Block Email Manager [Support Page]

    Quote Originally Posted by mcpisik View Post
    Thanks for looking into it.
    I've made the change, but can still create an account.
    I'm using 1.5.4 and note your talk of the updates were for later versions.

    I have yandex.com in my banned_domain.txt and [email protected] in my banned_email.txt
    But it still allows me to use [email protected] as a new account.

    Could you peek at me code to see if your suggested code change is entered correctly or if I have errors?

    Code:
        $error = true;
        $messageStack->add('create_account', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
      } elseif (($error == false) && (BLOCK_EMAIL_STATUS == 'true')) {   //added for blockemail mod
             if (zc_validate_blockemail($email_address) == false) {  
          $error = true;
          $messageStack->add('create_account', ENTRY_BLOCKEMAIL_ADDRESS_ACCOUNT_ERROR);  
          }
        } else {  
        $check_email_query = "select count(*) as total
                                from " . TABLE_CUSTOMERS . "
                                where customers_email_address = '" . zen_db_input($email_address) . "'";
        $check_email = $db->Execute($check_email_query);
    correct. Is BLOCK_EMAIL_STATUS set to true? I don't remember if ZC154 has error log folder, if so are there any error logs?
    Dave
    Always forward thinking... Lost my mind!

  7. #7
    Join Date
    Jan 2007
    Location
    Mount Maunganui, New Zealand
    Posts
    419
    Plugin Contributions
    0

    Default Re: Block Email Manager [Support Page]

    Yes, Block email status is set to true.
    No error logs relating to this.
    (Only some from russian hackers trying to do other stuff)

    It's creating the users to block fine, using admin, but not actually blocking them from account creation.

    Thanks again for looking.

  8. #8
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Block Email Manager [Support Page]

    @maartenvonz

    To answer your questions..
    I was thinking about the size that the text file will become. I've only had it installed 2 days, and my email list is already 1481 lines long, and the domain 67.
    Size is limited by the amount of memory set in your php.ini file, the size of the text file is not the problem.

    Another problem I have picked up is the use by the spammers of sub-domains, which are not picked up by just adding the TLD to the domain list.
    Your answer restricts the subdomain some what and is a lot of lines..
    Not sure if my answer would be backward compatible for older php... but works with php7.3.x

    Code:
    @list($name, $domain) = explode("@", $email);  //explode the address into strings, name and domain, lose the @
    $dword = explode(".", $domain);  //explode the domain into an array, lose the dot
    
    $tof = false;
    
        foreach($dword as $what) {
          if(in_array($what, $domainlist)) {
           $tof = true;  // we have a match
          }  
       }  
    
            if(in_array($email, $emaillist) || in_array($domain, $domainlist) || $tof) {
    However, you need to add the word in the banned_domain.txt
    For in_array() needs a excite match. I should change this to a regex line someday.. what this means you need correct words in banned_domain.txt.. so if you add addme without the .com it would match addme.addus.addyou.ccom

    Caution, if you do above code change, you can block countries by adding ccom no one with a email address ending with .ccom well ever be allowed to create an account or send you emails...

    I still need to do an update to this mod, but been getting sided track with other things.. well add this at that time with instructions/cautions.
    Dave
    Always forward thinking... Lost my mind!

 

 

Similar Threads

  1. Link Manager 3.0 Support Thread
    By clydejones in forum Addon Sideboxes
    Replies: 1987
    Last Post: 6 Aug 2021, 02:56 PM
  2. Testimonial Manager Support Thread
    By clydejones in forum All Other Contributions/Addons
    Replies: 1500
    Last Post: 4 Feb 2021, 04:12 PM
  3. v154 News Box Manager v2.0.0 [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 84
    Last Post: 19 Jan 2021, 04:17 PM
  4. Download File Manager Support Thread
    By balihr in forum All Other Contributions/Addons
    Replies: 24
    Last Post: 17 Aug 2017, 10:32 PM
  5. Poll Manager Support Thread
    By boudewijn in forum Addon Sideboxes
    Replies: 148
    Last Post: 27 Jan 2016, 09:53 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR