#!/bin/sh #--------------------------------------------------------------------------- # Original by Udi Mottelo Sun Nov 25 14:53:12 IST 2001 # Modified by Pau Oliva (pof) Fri Aug 23 05:32:49 CEST 2002 #--------------------------------------------------------------------------- # Yes, stupid random name + PID N=`awk 'BEGIN{srand();x=int(rand()*99999999%9999999);print x;exit}'`.$$ dir=/var/tmp/$N file=/var/tmp/$N/$N.$LOGNAME mkdir $dir && cd $dir && /bin/sed "w $file" /usr/bin/uudeview -i -v $file -p . 1>/dev/null 2>/dev/null /opt/f-prot/f-prot -archive -silent $dir infect=$? cd $dir/.. # But.. but, I don't need this line.. /bin/rm -rf $dir # Here comes the trick, F-prot says (return) Okay if the dir is clean, but, # procmail will drop the message if evry thing in filter is Okay, isn't? case "$infect" in 0|8) /bin/false ;; *) /bin/true ;; esac