Added Bash script example, + spymail.com domain (#350)

This commit is contained in:
Geno Shamugia 2022-12-26 20:49:54 +00:00 committed by GitHub
parent b52a46ab31
commit 8866a2ab76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -163,3 +163,26 @@ var addr = new MailAddress(email);
if (IsBlocklisted(addr.Host))) if (IsBlocklisted(addr.Host)))
throw new ApplicationException("Email is blocklisted."); 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"
```

View File

@ -2775,6 +2775,7 @@ spr.io
spritzzone.de spritzzone.de
spruzme.com spruzme.com
spybox.de spybox.de
spymail.com
squizzy.de squizzy.de
squizzy.net squizzy.net
sroff.com sroff.com