|
123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #!/bin/sh
-
-
-
-
-
-
- INSPECT_DIR=/var/spool/snfilter/msg
- SNIFFER_EXE=/var/spool/snfilter/SNFClient.exe
- SENDMAIL="/usr/sbin/sendmail -i"
- SPAMC="/usr/bin/spamc"
- MSGFILE=$INSPECT_DIR/`date +%Y%m%d%H%M%S`_$$_$RANDOM.msg
-
-
-
- EX_OK=0
- EX_TEMPFAIL=75
- EX_UNAVAILABLE=69
-
-
-
- trap "rm -f *$MSGFILE" 1 2 3 15
-
-
-
- cd $INSPECT_DIR || { echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }
-
-
-
- cat > $MSGFILE || { echo Cannot save mail to file; exit $EX_TEMPFAIL; }
-
-
-
- $SNIFFER_EXE $MSGFILE
- $SPAMC < $MSGFILE -e $SENDMAIL "$@"
- rm -f $MSGFILE
-
-
-
- exit $EX_OK;
-
-
|