how to block domain?

As a side note, maybe someone needs it, here is a list of domains used for disposable email addresses.
Copy/paste the list in Backend > Settings > Email Blacklist if you wish to block all these domains.


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.
 
You should add @ before domains
That will not be enough.

if you add -> /(.*)tmail\.com/i it will blacklist all hotmail.com emails
No, it would also blacklist wrongly this:
abc.def.ahotmail.comsdf.asdf@sadfsafas.com

You should make every row like this: /^(.*)@tmail\.com$/i
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
 
http://prntscr.com/l8p8hh
This is a test from https://regex101.com/

Can you explain please? Want to learn.
Thnx
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
 
See my post above.
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


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)
 
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.
That was exactly what I was saying.
There may be indeed some misunderstanding.
And to clarify, I try to answer step by step, line by line.

Someone posted here a list with domains supposed to be blocked.
Part of that list was /^(.*)tmail\.com$/i
Yes, that part is correct :)

I was trying to tell you to not use that list as is, because you will block other good TLDs including hotmail.com.
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.

I know how to block @hotmail.com
Hopefully we all do ;)

I don't think you misunderstood my post
See above, it seemed that some parts could be misunderstoond by some, and then wrong blacklist rules used.

http://prntscr.com/l8p8hh
This is a test from https://regex101.com/

Can you explain please? Want to learn.
Thnx
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.
 
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??
 
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?
 
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?
AFAIK, it is regex, but you can always check what works, since there is a testing tool inside the app.
 
Trying to import the domain blacklist and keep seeing this
 

Attachments

  • Screenshot 2024-06-28 at 08.16.50.png
    Screenshot 2024-06-28 at 08.16.50.png
    47.1 KB · Views: 4
Back
Top