mail log fine tuning
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
testhost=webthink.net
|
||||
testuser=webmaster@${testhost}
|
||||
logfile=~/checkMailQueryfail.log
|
||||
logfile=./checkMailQueryfail.log
|
||||
|
||||
mail=$1
|
||||
hostPart=${mail/*@/}
|
||||
@@ -12,7 +12,7 @@ hostPart=${mail/*@/}
|
||||
if [ hostPart != "localhost" ]
|
||||
then host=$(dig +short $hostPart MX | sort -n | head -n1 | cut -d " " -f 2)
|
||||
if [ -z ${host} ]
|
||||
then echo -e "{\"status\":\"err\", \"error\":\"Unknown mail hosti.\"}"
|
||||
then echo -e "{\"status\":\"err\", \"error\":\"Unknown mail host.\"}"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user