Maspik Documentation

Email Field

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:

  1. Open the plugin settings.
  2. Open the Email Fields accordion.
  3. Add each email address or domain you want to block, on separate lines.

Example:

If you add the following to the blacklist:

[email protected]
@spamdomain.com
*@*.ru

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.

More examples:


*+*@*.*
Explanation: This wildcard format blocks any email address that contains a + symbol. It's often used to block disposable email addresses.

/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.ru\b/i
Explanation: This regex pattern blocks email addresses ending with .ru domain, allowing for more complex matching than the wildcard version.

/^[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.