dear expert
Im using shell script to send mail from unix server.
My script like below:
HTML Code:
#! /bin/sh -f
# Set necessary variables
#export PATH
#PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/contrib/bin
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/contrib/bin:$PATH; export PATH
#PATH=/usr/bin:/usr/local/bin:$PATH; export PATH
# Get date
Date="`date +'%b %d %Y'`"
Date1="`date +'%b %d'`"
Date2="`date +'%Y'`"
# The recepient email address
Email="eizu.azwandi@mimos.my";
# Set directory
dir="/home/eizu";
dir_logs="/etc/namedb/log";
cd /etc/namedb/log
process=`more bind.log | grep "< ours" | wc -l`
tarikh=`date`
echo
echo "Counter: $process"
if [ $process -lt 1 ]; then
echo "Date checking:$tarikh"
echo "Message from dns2-test.mynic.net.my - ZONE TRANSFER NO ERROR"
fi
if [ $process -gt 0 ]; then
echo "Date checking:$tarikh"
echo "Message from dns2-test.mynic.net.my - ZONE TRANSFER ERROR!"
`mail $Email -s "TEST message from dns2-test.mynic.net.my" -c "ana@mimos.my" < $dir/zone-transfer-error.txt`
content=`more $dir_logs/bind.log >> $dir_logs/bind.log-14042006`;
cp /dev/null $dir_logs/bind.log
fi
but..i've got this errors come ahead
HTML Code:
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qs029602: from=eizu, size=135, class=0, nrcpts=7, msgid=<200604140431.k3E4V1qs029602@dns2-test.mynic>, relay=root@localhost
Apr 14 12:31:01 dns2-test sm-mta[29603]: k3E4V1qt029603: tcpwrappers (localhost.mynic.net.my, 127.0.0.1) rejection
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qs029602: to=ana@mimos.my,eizu.azwandi@mimos.my,-c,dns2-test.mynic.net.my,message,from,TEST, ctladdr=eizu (1021/1021), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=210135, relay=[127.0.0.1] [127.0.0.1], dsn=5.0.0, stat=Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qs029602: k3E4V1qt029602: DSN: Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qt029602: to=eizu, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31159, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qt029602: k3E4V1qu029602: return to sender: Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qu029602: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=32183, relay=[127.0.0.1], dsn=5.0.0, stat=Service unavailable
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qt029602: Losing ./qfk3E4V1qt029602: savemail panic
Apr 14 12:31:01 dns2-test sendmail[29602]: k3E4V1qt029602: SYSERR(root): savemail: cannot save rejected email anywhere
Anyone have suggestion on this??
Thanks
~unknown