We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d6cadc commit d231714Copy full SHA for d231714
func/main.sh
@@ -613,14 +613,7 @@ validate_format_ip_status() {
613
614
# Email address
615
validate_format_email() {
616
- local_part=$(echo $1 | cut -s -f1 -d\@)
617
- remote_host=$(echo $1 | cut -s -f2 -d\@)
618
- mx_failed=1
619
- if [ ! -z "$remote_host" ] && [ ! -z "$local_part" ]; then
620
- /usr/bin/host -t mx "$remote_host" &> /dev/null
621
- mx_failed="$?"
622
- fi
623
- if [ "$mx_failed" -eq 1 ]; then
+ if [[ ! "$1" =~ "@" ]] ; then
624
echo "Error: email $1 is not valid"
625
log_event "$E_INVALID" "$EVENT"
626
exit $E_INVALID
0 commit comments