procmail
[Top] [All Lists]

Re: Procmail + spamassassin

2003-03-20 09:38:41
On Thu, Mar 20, 2003 at 11:05:15AM -0500, Matt Dunford wrote:
I used to use something like this, tho I can't remember the exact recipe
now:

:0:
* ! ? $SPAMASSASSIN -e
spam

However I found that spamassassin's exit codes were unreliable.
Sometimes my recipe would exit 0, but when I ran spamassassin from the
cmd line on the same msg, it would exit a non-zero number (ie, spam).  I
could never reproduce this or track it down.  But this happened rarely
and perhaps it's fixed in newer versions.

The reason for your inconsistent results is that you are running your
test only on the message headers, not the body.  As I just wrote in
another contest to Louis LeBlanc, the default for procmail is to
run conditions against the headers only.  Since you want SA to run
on the headers and the body, you need to tell it so:

        :0:
        * BH ! ?? ? $SPAMASSASSIN -e
        spam

I think, though I don't have time to check my syntax on the
condition line right now, and I don't use BH stuff in conditions
enough to have it down for sure in my head.

But if that's not it, it's close.

-- 
dman

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