#!/bin/sh
. ./all.env
cat <<EOF > $TEMPPAT
X-test-x-track: testing accepted
Received: not from our MX
Received: our MX said 65.54.247.58
Cc: doe@ourhost.gov
Cc: doe@ourhost.gov
Bcc: doe
Cc: doe@ourhost.gov
Bcc: doe@ourhost.gov
To: andy@ourhost.gov
To: bob@ourhost.gov
To: carl@ourhost.gov
Message-Id: <a@b> flags=
Message-Id: <ab> flags=[MID]
Message-Id: <@b> flags=[MID]
Message-Id: <a@> flags=[MID]
Message-Id: a@b flags=[MID]
From: a flags=
From: a@ flags=
From: a@host.foo flags=[FRM]
EOF
cd ..; ./slowmilter -Cslow.conf -Dheader > $TEMPOUT
if `diff $TEMPPAT $TEMPOUT`; then
	echo "\t"$0:"\t"OK
	rm $TEMPPAT $TEMPOUT
	exit 0
fi
echo "\t"$0:"\t"failed
diff -c $TEMPPAT $TEMPOUT
rm $TEMPPAT $TEMPOUT
exit 1
