diff --git a/checkMail.sh b/checkMail.sh index 8a278d7..deffba9 100755 --- a/checkMail.sh +++ b/checkMail.sh @@ -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