procmail
[Top] [All Lists]

Re: clamavd & procmail

2004-03-03 13:54:53
Martynas Buozis <martynas(_at_)ti(_dot_)com> wrote:
I managed to solve my problem. I found out, that program exits
with code 1 instead of 0 when virus is identified. So procmail
restores original message. Can somebody tell me why ":0 fW"
was not ignoring erro code ???

This came up recently on this list. My recollection is that 'W' suppresses the
message, but does not change the basic function of 'w', namely leaving the
original text unmodified on failure (non-zero exit code).

I believe what you want to to is run clamavd on the message and TEST the exit
code. Bart Schaefer and others talked me through a similar process recently,
and suggested this approach (which I'm currently about to test):

REPORT=`external program`

STATUS=$?

:0

* ! STATUS ?? ^^0^^

{

    [stuff to do if exitcode is not zero]

}

Now I found another problem. In some cases procmail is
changing line "From ..." to ">From ....". Why it happens ?

As you noted in your next message, this is occurring outside of procmail. How
are you grabbing the message to start with? formail will do From_ escaping like
that.

Good luck with it!

- Bob



_______________________________________________
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>