AQ=/var/spool/postfix/active SINGLEINST=5120 TOOBIG=10485760 for x in `find $AQ -size +"$SINGLEINST"c -type f` do NAME=`echo $x | cut -f 6 -d "/"` MSIZE=`ls -l $x | gawk '{ print $5 }'` NUMRECIP=`/usr/sbin/postcat $x | head -180 | grep -e "original_recipient:" | wc -l` TOTSIZE=`expr $NUMRECIP \* $MSIZE` logger "POSTFIX-DELAY = $NAME : $MSIZE : $NUMRECIP : $TOTSIZE" if [ `expr $TOTSIZE \> $TOOBIG` == 1 ] then /usr/sbin/postsuper -h $NAME fi done |
*/10 7,8,9,10,11,12,13,14,15,16,17,18,19 * * * /admin/bin/postfix_delay |
10 20 * * * /usr/sbin/postsuper -H ALL |