You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Gary W. Smith" <ga...@primeexalia.com> on 2004/11/08 06:42:09 UTC

SpamC test question

We are running 2.x in production and are ready to switch to 3.x and are
trying to do a side by side comparison of the results.  We are basically
running it through the original spamd 2.x on the local box (which is a
relay) and then sending it to a remote box which is running the spamd
3.x.  Is there a better was to pump this to two different spamd's while
capturing the results?

Here is our filter script:
#!/bin/sh
TEE="/usr/bin/tee"
SPAMC="/usr/bin/spamc"
SENDMAIL="/usr/sbin/sendmail"

FND=`/bin/date +%Y%m%d`
FNT=`/bin/date +%H%M%S`
T=`date +%N`
FNE=`echo "obase=16;$T"| /usr/bin/bc`
FN="/tmp/$FND/$FND-$FNT-$FNE"

if [ ! -d /tmp/$FND ];then
        mkdir /tmp/$FND
fi

# Scan the original
$TEE -a $FN.mail | $SPAMC | $TEE -a $FN.proc | $SENDMAIL -i "$@" 

# Scan the copy
cat $FN.mail | $SPAMC -d 10.0.0.194 > /tmp/$FND/$FND-$FNT-$FNE.dev &

retval=$?
exit $retval