fixing the serverside e-mail checking

This commit is contained in:
WebMaster
2017-02-08 00:00:54 -05:00
parent f5e1367e57
commit 7f597c5f98
2 changed files with 8 additions and 6 deletions

10
checkMail.sh Normal file → Executable file
View File

@@ -4,7 +4,7 @@
testhost=webthink.net
testuser=webmaster@${testhost}
logfile=~/mailqueryfail.log
#logfile=~/mailqueryfail.log
mail=$1
hostPart=${mail/*@/}
@@ -39,10 +39,10 @@ EOE
) | expect -f - | grep -e '^5')
if [ -z "${result}" ]
then echo "OK : " $mail >> $logfile
echo -e "{status:'ok'}"
then echo "OK : " $mail >> /dev/null # $logfile
echo -e "{'status':'ok'}"
exit 0
else echo $mail ":" $result >> $logfile
echo -e "{status:'err', error:'Unknown User'}"
else echo $mail ":" $result >> /dev/null # $logfile
echo -e "{'status':'err', error:'Unknown User'}"
exit 1
fi