Brook Humphrey <[EMAIL PROTECTED]> 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

Reply via email to