Email Field blacklist
Description: The “Email Field” option in the Maspik plugin allows you to protect email input fields in forms from spam by using a blacklist of email addresses or domains. Messages containing blacklisted email addresses will be marked as spam.
How to Use:
- Open the plugin settings.
- Open the Email Fields accordion.
- Add each email address or domain you want to block, on separate lines.
Example:
If you add the following to the blacklist:
Any message containing the email address [email protected]
or any email address from the domain spamdomain.com
will be marked as spam as well as any mail domain that ends with .ru, for example, [email protected] will be blocked.
[email protected]
@spamdomain.com
*@*.ru
Also from version 2.4.0, you can add part of the email address, and if it is found in the email address, it will be blocked.
@spamdomain
example
.ru
ericjones
More examples:
+
Explanation: This + will blocks any email address that contains a + symbol. It's often used to block disposable email addresses.
.ru
Explanation: Will blocks email addresses ending with .ru domain.
/^[a-zA-Z0-9._%+-]+@(?!gmail\.com)[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/
Explanation: This regex pattern blocks all email addresses except those from gmail.com domain (Use cerfuly).
7. /^(?!.*@(gmail|yahoo|hotmail)\.com)[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/
Explanation: This regex pattern blocks all email addresses except those from gmail.com, yahoo.com, and hotmail.com domains.
8. *@*.temp
Explanation: This wildcard format blocks email addresses from any domain ending with .temp, often used for temporary email services.
9. /^[a-zA-Z0-9._%+-]+@(?!(gmail|yahoo|outlook)\.).+\.[a-zA-Z]{2,}$/
Explanation: This regex pattern blocks email addresses from all domains except gmail, yahoo, and outlook.(Use cerfuly)
10. test*@*.*
Explanation: This wildcard format blocks any email address that starts with "test".
Risk: Blocking too many email addresses or domains may result in false positives. Legitimate users with email addresses that match or contain the blacklisted patterns might also get blocked. Regularly review the spam log to ensure no legitimate messages are being mistakenly blocked.
Recommendation: To minimize the risk of false positives, avoid adding generic domains or common email providers to the blacklist unless absolutely necessary. If possible, target specific problematic email addresses or domains known for spam activity.