Merge branch 'edge' of git+ssh://kawomi.com/var/local/git/i-buy.properties into edge
This commit is contained in:
38
checkMail.sh
38
checkMail.sh
@@ -22,24 +22,26 @@ else
|
|||||||
host=localhost
|
host=localhost
|
||||||
fi
|
fi
|
||||||
|
|
||||||
result=$((cat << EOE
|
#result=$((cat << EOE
|
||||||
set timeout 60
|
#set timeout 60
|
||||||
spawn nc $host 25
|
#spawn nc $host 25
|
||||||
expect "220" {
|
#expect "220" {
|
||||||
send "EHLO ${testhost}\r"
|
#send "EHLO ${testhost}\r"
|
||||||
expect "250 " {
|
#expect "250 " {
|
||||||
send "MAIL FROM:<${testuser}>\r"
|
#send "MAIL FROM:<${testuser}>\r"
|
||||||
expect "250" {
|
#expect "250" {
|
||||||
send "RCPT TO:<${mail}>\r"
|
#send "RCPT TO:<${mail}>\r"
|
||||||
expect "250" {
|
#expect "250" {
|
||||||
send "QUIT\r"
|
#send "QUIT\r"
|
||||||
} -re \[\n\r\]5.*$ {
|
#} -re \[\n\r\]5.*$ {
|
||||||
exit 1 1
|
#exit 1 1
|
||||||
close
|
#close
|
||||||
}
|
#}
|
||||||
}}}
|
#}}}
|
||||||
EOE
|
#EOE
|
||||||
) | expect -f - | grep -e '^5')
|
#) | expect -f - | grep -e '^5')
|
||||||
|
|
||||||
|
result="" #don't verify the accounts anymore, that results in blacklisting :(
|
||||||
|
|
||||||
if [ -z "${result}" ]
|
if [ -z "${result}" ]
|
||||||
then echo "`date` - OK : " $mail >> $logfile
|
then echo "`date` - OK : " $mail >> $logfile
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $headers = "MIME-Version: 1.0" . "\r\n";
|
|||||||
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
|
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
|
||||||
|
|
||||||
// More headers
|
// More headers
|
||||||
$headers .= 'From: <webmaster@netsquat.com>' . "\r\n";
|
$headers .= 'From: <webmaster@kawomi.com>' . "\r\n";
|
||||||
$result=mail ("webmaster@i-buy.properties","new From", $data, $headers);
|
$result=mail ("webmaster@i-buy.properties","new From", $data, $headers);
|
||||||
|
|
||||||
if($result){
|
if($result){
|
||||||
|
|||||||
Reference in New Issue
Block a user