diff --git a/README.md b/README.md index 5d560fc..7592403 100644 --- a/README.md +++ b/README.md @@ -163,3 +163,26 @@ var addr = new MailAddress(email); if (IsBlocklisted(addr.Host))) throw new ApplicationException("Email is blocklisted."); ``` + +### Bash + +``` +#!/bin/bash + +# This script checks if an email address is temporary. + +# Read blocklist file into a bash array +mapfile -t blocklist < disposable_email_blocklist.conf + +# Check if email domain is in blocklist +if [[ " ${blocklist[@]} " =~ " ${email#*@} " ]]; then + message="Please enter your permanent email address." + return_value=false +else + return_value=true +fi + +# Return result +echo "$return_value" +``` + diff --git a/disposable_email_blocklist.conf b/disposable_email_blocklist.conf index ce2bccc..9881587 100644 --- a/disposable_email_blocklist.conf +++ b/disposable_email_blocklist.conf @@ -2775,6 +2775,7 @@ spr.io spritzzone.de spruzme.com spybox.de +spymail.com squizzy.de squizzy.net sroff.com