watch -n 1 '
uptime
IP=1.2.3.4
HOLD=`netstat -nap|grep $IP:25|grep SYN_RECV|wc -l`
EST=`netstat -nap|grep $IP:25|grep ESTABLISHED|grep - | wc -l`
ACTIVE=`netstat -nap|grep $IP:25 | grep ESTABLISHED|grep -v -|wc -l`
(( TOTAL=HOLD+EST+ACTIVE ))
echo "Inkomende SMTP connecties naar $IP: $HOLD nieuw + $EST wachtend + $ACTIVE actief = $TOTAL"
echo -n "Connecties afgehandeld: "
grep ' from ' /var/log/qmail/qmail-smtpd/current |wc -l
# echo -n "Qmail status: "
# grep status: /var/log/qmail/qmail-smtpd/current |tail -1
echo
echo Geblokkeerde mailservers:
tac /var/log/qmail/qmail-smtpd/current|grep rblsmtpd|head -5|tac|cut -f 3- -d" "
echo
echo -n "Laatste scan tijden: ";
grep TIMING /service/amavis/log/main/current |tail -10|egrep -o "[0-9]* ms"| tr "\n" "|"
echo
echo Huidige scan processen:
ps ax|egrep "dspam" | grep -- "--user"|grep -v grep
echo
echo Laatst verwerkt door spamfilter:
tail -5 /home/system/dspam/system.log|cut -f 6-8
echo
echo Uitgaande mails:
/var/qmail/bin/qmail-qstat
tac /var/log/maillog|grep "starting delivery"|head -5 |tac|cut -f7- -d" "
sleep 1
'