procmail
[Top] [All Lists]

RE: Real Virus Scanner

2004-02-11 16:15:23

[This subject came up on the spamassassin list. I'm reposting it here.]


From: David B Funk <dbfunk(_at_)engineering(_dot_)uiowa(_dot_)edu>
Date: Wed, 11 Feb 2004 15:49:49 -0600 (CST)

Brook Humphrey <bah(_at_)webmedic(_dot_)net> wrote:
[...]
-I didn't catch this whole thread But I'm using maildrop with
a shell script to pipe the mail through clamd. It works very
well. If you need the scripts let me know.

Christopher had a procmail recipe that did it all within procmail. I'm
already
doing a lot of stuff with spamassassin, etc. so was trying to avoid calling
shell/perl scripts. Thanks for the offer though.

Thanks to Christopher's hint, I wound up with the following in procmailrc,
which seems to be working:

        #======================================================
        # clamav virus scan
        #======================================================
        :0 HB
        VIRUS=|/usr/bin/clamscan --mbox --disable-summary --stdout  -

        :0 Dfw
        * VIRUS ?? ^.*: \/.* FOUND
        | formail -A "X-Virus-Status: yes, $MATCH"

        :0 Efw
        | formail -A "X-Virus-Status: no"

Note that I tag infected messages, not dump them immediately, for gathering
stats. It seems to be catching the test infected messages I sent though just
fine. I probably need to dump --stdout as well, since it's not acting as a
filter.

Now -- IF mbox is a problem -- I could just send the BODY through with the
procmail B flag alone, and not use --mbox, right?

I realize we're getting off-topic, but I want to tag spam AND virus messages
with the respective most appropriate tool, then handle final disposition
afterwards (in one place).

- Bob



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