mail log fine tuning

This commit is contained in:
Joe
2017-02-07 23:49:39 -06:00
parent f829028ddf
commit b4c98d097e

View File

@@ -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