procmail
[Top] [All Lists]

Re: More clamav testing (results)

2004-02-13 18:00:36
On Sat, 14 Feb 2004, Dallman Ross wrote:

Re-reading "man procmailrc" leads me to the conclusion that the only
difference [between the "w" and "W" flags] is that procmail won't log
a warning message about the program failure in the second case -- but
in either case it still does note the error exit status and therefore
throw away the output.

       :0 W  # 031130 () this is an assignment recipe, not a delivering one
        * < 250000
        * $ $GO^0    REDELIVER  ??  $TRUE
        * $ $GO^0  ! TEST       ??  $TRUE
        SA_OUT=| /users/zconcept/bin/spamc -c

       :0 e  # 021223 () if exit status warrants, tag as spam
        { RX = SpamAssassin }

       :0 E:  # 030205 () check for possible spamc failure
        * SA_OUT ?? ^^0/0^^
        spamc_failure

I've never seen a spamc_failure one, so I'm not absolutely
certain there, though I did test it thoroughly

Spamc never exits with a zero (success) status unless it both processed
the message and found it to be ham.  Finding spam and failure to connect
to the server are both non-zero exit status cases.  So I would never
expect the spamc_failure case to occur, but I would expect $RX to be set
to "SpamAssassin" when spamd is unreachable.

So I don't see anything in your example to disprove my orignal thesis.
Even if $RX is never set incorrectly, that still means spamc exited with a
zero status, which would mean that SA_OUT was assigned.  You're never
looking at SA_OUT in the non-zero-exit case, which is the interesting one.

If you rewrite it this way ...

        :0 W
        SA_OUT=| /users/zconcept/bin/spamc -c

        :0 e:
        * SA_OUT ?? ^^0/0^^
        spamc_failure

        :0 E
        { RX = SpamAssassin }

... and THEN tell me that $RX is never set incorrectly, that would in fact
contradict my explanation.


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