Is there anyway to have CHECKATTATCH delete the attatchment before rejecting
it???

        ... the reason is, I've noticed serveral times that the message with
banned attatchement is sent from one our employees to another of our
employees, it is rejected (good) but then sent back to the sender (which of
course is being 'filtered too) which bounces and eventually ends up
bit-bucketed...

If someone would give me a way to send a copy of the mail to another
(un-filtered) account like I've asked before this wouldn't be nessicary...

BUT, if it would strip the attatchment, then at least the sender would know
they've send something bad, and that it was rejected...

Thanks!!!


BELOW IS CHECKATTATCH

______________________

#!/bin/sh
#
printmsg () {
        echo " "
        echo "Sorry, the attachment you sent is in violation of our
company's policy."
        echo "If you have any questions, please direct them to
[EMAIL PROTECTED]"
        echo " "
        echo "--- Attachment filetype you sent is $ATTYPE"
}

#
checktype () {
        case $ATTYPE in
                VBS | VBE | JSE | CSS | WSH | SCT | HTA | VXD | EXE | DOT |
HLP | PAK | PPS | COM | CMD | OCX | SHS | CLA | AU | DLL)
                        printmsg $ATTYPE
                        exit 100;;
                *)
                        ;;
        esac
}

ATTACHTYPE=`grep "name=" - | awk 'BEGIN {FS="."}; {print toupper($NF)}' |
cut -c -3`
for ATTYPE in $ATTACHTYPE
do
        checktype $ATTYPE
done

exit 0



Reply via email to