How to blacklist the following domains?

dante

Member
Hi,

I want to blacklist the following domains and all the email addresses it has.

gmai.com
gmial.com
gmaol.com
gmil.com
iclould.com
gmeil.com
iclouds.com
icoud.com
ggmail.com
hotmial.com
yahio.com
gmell.com
hotmil.com
gmailz.com
iclound.com
gmaio.com
gmile.com
gmaul.com
iclould.com
gmaul.com
iclud.com

gmsil.com
yahoo.con
gamil.com
gmail.co
ail.com
gnail.com
gmal.com
gail.com
yhoo.com
hmail.com
gmaill.com
yaho.com
yshoo.com
g.mail.com
yahoo.co
g-mail.com
gmail.comm
gmail.vom
icloud.con
hotmail.con
gimail.com
gmail.cim
gemail.com
gmail.com.com


I don't know anything about regex so can anyone help me out?

Thanks
 
For the .com domains above:
see: https://regex101.com/r/5JoGkJ/1
Code:
/(gmai|ggmail|gmial|gmaol|gmil|iclould|gmeil|iclouds|icoud|hotmial|yahio|gmell|hotmil|gmailz|iclound|gmaio|gmile|gmaul|iclud|gmsil|gamil|ail|gnail|yhoo|gmal|gmaill|yaho|yshoo|gimail|gemail|gmail\.com)\.(com)$/i
You get the point :)
 
For the .com domains above:
see: https://regex101.com/r/5JoGkJ/1
Code:
/(gmai|ggmail|gmial|gmaol|gmil|iclould|gmeil|iclouds|icoud|hotmial|yahio|gmell|hotmil|gmailz|iclound|gmaio|gmile|gmaul|iclud|gmsil|gamil|ail|gnail|yhoo|gmal|gmaill|yaho|yshoo|gimail|gemail|gmail\.com)\.(com)$/i
You get the point :)


Thank you :)

I'll just have to paste it in "Email Blacklist" right?
The above will take out also the real Gmail.com domain...
...and you still need to take care of all that do not end in ".com" ;)
 
The above will take out also the real Gmail.com domain...
Because of the ail.com domain, good catch.
Maybe a better regex would be:
Code:
/^(.*)@(gmai|ggmail|gmial|gmaol|gmil|iclould|gmeil|iclouds|icoud|hotmial|yahio|gmell|hotmil|gmailz|iclound|gmaio|gmile|gmaul|iclud|gmsil|gamil|ail|gnail|yhoo|gmal|gmaill|yaho|yshoo|gimail|gemail|gmail\.com)\.(com)$/i
https://regex101.com/r/5JoGkJ/3
 
Because of the ail.com domain, good catch.
Maybe a better regex would be:
Code:
/^(.*)@(gmai|ggmail|gmial|gmaol|gmil|iclould|gmeil|iclouds|icoud|hotmial|yahio|gmell|hotmil|gmailz|iclound|gmaio|gmile|gmaul|iclud|gmsil|gamil|ail|gnail|yhoo|gmal|gmaill|yaho|yshoo|gimail|gemail|gmail\.com)\.(com)$/i
https://regex101.com/r/5JoGkJ/3
works for all ending in ".com" incl "gmail.com.com"

hmm the last one still has "gmail\.com"
yes, but that is not a problem in this new formula

however, @dante, from the above you can derive the formula for those not ending in ".com"
;)
 
Because of the ail.com domain, good catch.
Maybe a better regex would be:
Code:
/^(.*)@(gmai|ggmail|gmial|gmaol|gmil|iclould|gmeil|iclouds|icoud|hotmial|yahio|gmell|hotmil|gmailz|iclound|gmaio|gmile|gmaul|iclud|gmsil|gamil|ail|gnail|yhoo|gmal|gmaill|yaho|yshoo|gimail|gemail|gmail\.com)\.(com)$/i
https://regex101.com/r/5JoGkJ/3
When I open the link it still doesn't catch "gmail.com" see the first entry on the link. What to remove so that gmail doesn't get blacklsited?

OOPS: It seems that's the whole point lol. I must be high haha
 
I'm curious, where would you put this regex? You can't insert it into the email blacklist, mailwizz says its an invalid email address.

Of course, just blacklisting things like:
*@ggmail.com
seems to work just fine.
 
I'm curious, where would you put this regex? You can't insert it into the email blacklist, mailwizz says its an invalid email address.

Of course, just blacklisting things like:
*@ggmail.com
seems to work just fine.
/backend/settings/email-blacklist
 
Back
Top