Rossz Vamos-Wentworth <[EMAIL PROTECTED]> asked:
> Can someone tell me how to call f-prot from procmail and
> nuke the message if it is virused?
This is the recipe I used to use before I installed mimedefang to do it earlier in
the mail processing. It is more complicated than absolutely necessary because I
wanted to create a X-Virus-Found header that said what the virus was and then filter
on that. I'm not sure if I properly take care of any situations in which f-prot might
produce an error that is not supposed to mean that it found a virus.
These work by writing the mail message to a temporary file, running the file through
f-prot, getting the return code, and deleting the file. The :0E matches if the
previous call to f-prot returns a non-zero code.
Please note that my mail software, and maybe yours too, wordwraps the very long
lines.
#Virus scanning stuff
VIRTEMP=virtempmail.$$
:0c
${VIRTEMP}
:0
* ? /usr/local/bin/f-prot -silent ${VIRTEMP}
{
VIRSCAN=`echo $?;rm -f ${VIRTEMP}`
}
:0E
{
VIRSCAN=`/usr/local/bin/f-prot ${VIRTEMP} | sed -n -e "s/^.*Infection:
\(.*$\)/\1/p";rm -f ${V
IRTEMP}`
:0fw
|formail -f -I "X-Virus-Found: ${VIRSCAN}"
}
#End virus scanning stuff
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk