how to block domain?

Discussion in 'General discussions' started by axyoma, Jul 1, 2015.

  1. Eldi

    Eldi Member

    Joined:
    Mar 19, 2015
    Messages:
    53
    Likes Received:
    2
    S.E:
    2019-10-03 09:47:13
    L.T:
    Regular
    L.C:
    4

    Don't use this list as is.
    You should add @ before domains.
    Example:

    if you add -> /(.*)tmail\.com/i it will blacklist all hotmail.com emails
    You should make every row like this: /^(.*)@tmail\.com$/i

    Hope this helps someone.
     
  2. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,708
    Likes Received:
    677
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    That will not be enough.

    No, it would also blacklist wrongly this:
    abc.def.ahotmail.comsdf.asdf@sadfsafas.com

    The logic format is right, but it would not blacklist "hotmail.com", only "tmail.com"
    To block "hotmail.com", you can use this:
    /(.*)@hotmail\.com$/i
     
  3. Eldi

    Eldi Member

    Joined:
    Mar 19, 2015
    Messages:
    53
    Likes Received:
    2
    S.E:
    2019-10-03 09:47:13
    L.T:
    Regular
    L.C:
    4
    Can you please try and add this on your domains blacklist:
    /(.*)tmail\.com/i

    Then try to add sometestemail@hotmail.com to see :)
     
  4. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,708
    Likes Received:
    677
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    Please check here: https://regex101.com/
    In your tests, did mailwizz work differently than regex101?
     
  5. Eldi

    Eldi Member

    Joined:
    Mar 19, 2015
    Messages:
    53
    Likes Received:
    2
    S.E:
    2019-10-03 09:47:13
    L.T:
    Regular
    L.C:
    4
  6. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,708
    Likes Received:
    677
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    See my post above.
    Basically, your filter is to big and catches to much.
    If you want to block emails to the domain "@hotmail.com"
    this will NOT work properly: /^(.*)@tmail\.com$/i
    see example above, since it will catch also those that have "hotmail.com" string before the "@".

    So, to block emails to the domain "@hotmail.com", you can use this:
    /(.*)@hotmail\.com$/i
     
  7. Eldi

    Eldi Member

    Joined:
    Mar 19, 2015
    Messages:
    53
    Likes Received:
    2
    S.E:
    2019-10-03 09:47:13
    L.T:
    Regular
    L.C:
    4

    That was exactly what I was saying. Someone posted here a list with domains supposed to be blocked.
    Part of that list was /^(.*)tmail\.com$/i

    I was trying to tell you to not use that list as is, because you will block other good TLDs including hotmail.com.

    P.S
    I know how to block @hotmail.com and I don't think you misunderstood my post (even though my english is not that good)
     
  8. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,708
    Likes Received:
    677
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    First, let me correct my above post: https://forum.mailwizz.com/posts/36278
    It should be
    "See my post above.
    Basically, your filter is to big and catches to much.
    If you want to block emails to the domain "@hotmail.com"
    this will NOT work properly: /^(.*)@tmail\.com$/i
    see example above, where /(.*)tmail\.com/i catches also abc.def.ahotmail.comsdf.asdf@sadfsafas.com
    since it will catch also those that have "hotmail.com" string before the "@".
    This /^(.*)@tmail\.com$/i however catches only the domain "@tmail.com".

    So, to block emails to the domain "@hotmail.com", you can use this:
    /(.*)@hotmail\.com$/i
    "

    Now, let me answer your last post.
    There may be indeed some misunderstanding.
    And to clarify, I try to answer step by step, line by line.

    Yes, that part is correct :)

    Yes, and/but even more than that. And that is why I was trying telling you, that what you wrote had some more implications than you may have wanted. And to make sure the non-regex-fluent user (though they can experiment/test in the regexer site) has the right examples, I attempted to clarify with clear examples what works, and what not.

    Hopefully we all do ;)

    See above, it seemed that some parts could be misunderstoond by some, and then wrong blacklist rules used.

    In
    https://prnt.sc/l8p8hh
    prnt.sc#l8p8hh.jpg
    you use /(.*)otmail\.com$/i
    which is different in logic than /(.*)tmail\.com/i
    since the "$" at the end forces the string to be found at the end.
    And since you wrote that in reply to me pointing out that /(.*)tmail\.com/i would not work properly, it seemed you missed my point, that /(.*)tmail\.com/i will find "hotmail.com" before and after the "@", and more, even as a string alone.
    But further, /(.*)otmail\.com$/i will also block wrongly all strings ending "otmail.com", not only the domains ending with "otmail.com".
    [Not sure if I should assume you made two typos "@hotmail.com" (to make your l8p8hh example correct) versus "otmail.com" (two typos?).]

    Please let me know what am I missing. The above was written to clarify, to find errors in thinking, only. Thank you.
     
  9. tizaj

    tizaj Member

    Joined:
    Oct 7, 2018
    Messages:
    31
    Likes Received:
    1
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    hi... so if this is set up for baddomain.com and you already have existing email addresses with baddomain.com in your lists, will it also blacklist the existing lists??
     
  10. twisted1919

    twisted1919 Administrator Staff Member

    Joined:
    Dec 27, 2014
    Messages:
    10,287
    Likes Received:
    2,389
    @tizaj - yes, they will be blacklisted right before an email goes to them.
     
  11. Germán Maretto

    Germán Maretto New Member

    Joined:
    Jan 29, 2018
    Messages:
    3
    Likes Received:
    2
    S.E:
    Expired
    L.T:
    Regular
    L.C:
    1
    Hi, frm.mwz,
    With the current version of MailWizz (1.7.2), can you just paste in Settings/Email Blacklist all the domains as they're, or you need still to paste them as regex, like /(.*)@abc\.com/i?
     
  12. frm.mwz

    frm.mwz Well-Known Member

    Joined:
    Mar 8, 2016
    Messages:
    3,708
    Likes Received:
    677
    S.E:
    2019-11-27 02:17:39
    L.T:
    Regular
    L.C:
    7
    AFAIK, it is regex, but you can always check what works, since there is a testing tool inside the app.
     
    Germán Maretto likes this.

Share This Page