fixing the serverside e-mail checking
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
echo shell_exec('./checkmail.sh \'' . $_GET['mailAddress'] . '\'');
|
$mailAddress=$_GET['mailAddress'];
|
||||||
|
$output=shell_exec(__DIR__ . '/checkMail.sh \'' . $mailAddress . '\'');
|
||||||
|
echo $output;
|
||||||
?>
|
?>
|
||||||
|
|||||||
10
checkMail.sh
Normal file → Executable file
10
checkMail.sh
Normal file → Executable file
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
testhost=webthink.net
|
testhost=webthink.net
|
||||||
testuser=webmaster@${testhost}
|
testuser=webmaster@${testhost}
|
||||||
logfile=~/mailqueryfail.log
|
#logfile=~/mailqueryfail.log
|
||||||
|
|
||||||
mail=$1
|
mail=$1
|
||||||
hostPart=${mail/*@/}
|
hostPart=${mail/*@/}
|
||||||
@@ -39,10 +39,10 @@ EOE
|
|||||||
) | expect -f - | grep -e '^5')
|
) | expect -f - | grep -e '^5')
|
||||||
|
|
||||||
if [ -z "${result}" ]
|
if [ -z "${result}" ]
|
||||||
then echo "OK : " $mail >> $logfile
|
then echo "OK : " $mail >> /dev/null # $logfile
|
||||||
echo -e "{status:'ok'}"
|
echo -e "{'status':'ok'}"
|
||||||
exit 0
|
exit 0
|
||||||
else echo $mail ":" $result >> $logfile
|
else echo $mail ":" $result >> /dev/null # $logfile
|
||||||
echo -e "{status:'err', error:'Unknown User'}"
|
echo -e "{'status':'err', error:'Unknown User'}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user