procmail
[Top] [All Lists]

Re: Using tthe return status of a program to filter

2002-08-23 15:15:16
On Fri, Aug 23, 2002 at 04:36:23PM -0400, Eric S. Raymond wrote:
I'm working on bogofilter, a Bayesian spam filter.  I wabt to document
how it can be integrated into a procmail setup.  So:

Suppose I have a utility named bogofilter that tests its standard input and
returns 0 for spam, 1 for nonspam, How do I write a recipe that
directs mail getting a 1 return value to a spam box?

Yes, I have read the man pages.  

Use ? in your condition line.
Since you want it to trigger on a 1 exit status (program failure / false),
invert the condition with !.

:0:
* ! ? /path/to/bogofilter
action for spam mail

-- 
Andrew Edelstein        -       http://andrew.pure-chaos.com/resume.txt

Please do not reply directly to me, or Cc: me on a reply to a list message.
I'll get my copy from the list.
_______________________________________________
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>