#!/bin/sh SENDMAIL="/usr/sbin/sendmail -i" EGREP=/bin/egrep EX_UNAVAILABLE=69 SIDELINE_DIR="/var/spool/filter" SPAMLIMIT=5 trap "rm -f /var/tempfs/out.$$" 0 1 2 3 15 cat | /opt/spamassasin/bin/spamc > /var/tempfs/out.$$ if $EGREP -q "^X-Spam-Level: \*{$SPAMLIMIT,}" < /var/tempfs/out.$$ then FROM=`cat /var/tempfs/out.$$ | $EGREP -i "From: " | head -n 1` echo `date +%Y-%m-%d_%R` $FROM >> /var/log/spamd_delete #mv /var/tempfs/out.$$ $SIDELINE_DIR/`date +%Y-%m-%d_%R`-$$ else $SENDMAIL "$@" < /var/tempfs/out.$$ fi exit $?
мож кому пригодится
Комментариев нет:
Отправить комментарий