procmail
[Top] [All Lists]

Procmail and Antivirus

2003-07-16 09:46:36
Hi,

Here on my job, we bought NAV but these guys dont have native support for
linux.  So I decide to make some procmail rules to work with it.

Here I post my rules, and then my doubts.

# I forward all mail to antivirus.sh script
:0 fw
| /etc/procmail/antivirus.sh

# If script fails then I send a mail telling that you have a virus
# This actually does not work, I realy dont know why
:0 e
| (formail -r -A "ASA: Virus en correo electronico" \
       -l"From: security(_at_)asa(_dot_)gob(_dot_)mx" \
       -l"Subject: Correo con virus (Re: $SUBJECT)" \
       -A "X-Loop: security(_at_)asa(_dot_)gob(_dot_)mx"; \
       echo "Revice su maquina por favor" ) | $SENDMAIL -t


# If scripts does not fail then mail is stored on mailbox
# This I currently dont know if it's ok like this

:0:
${DEFAULT}

---------------------------------------------
Here is antivirus.sh



#!/bin/sh
dir=/tmp/nav/$LOGNAME.$$
antivirus_dir=/usr/local/bin
mkdir $dir
METAMAIL_TMPDIR=$dir
export METAMAIL_TMPDIR
sed '/^Content.*multipart\/alternative/s/alternative/mixed/' |
/usr/bin/metamai$
cd $antivirus_dir

# Norton Antivirus
/usr/local/bin/cscmdline  $dir -a repair

ESTADO=$?

if [ $ESTADO -gt 0 ]; then
   exit $ESTADO
else
   echo NAV con exito;
fi



does any one has work with something like this??

Thanks.

Luis Daniel.





_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>