procmail
[Top] [All Lists]

Exiting from Procmail after each recipe

2002-03-26 00:36:50

Hi all -

I have a procmail question regarding my home-grown anti-spam filter.

I have a whole slew of filters to look for spam, all of them following a standard formula:

:0
* ^Subject:.*(viagra|loan approval)
spam

etc. Now I would like to change all these recipes so that instead of putting it into a folder called "spam", I'd like to merely add a header identifying it as spam then place them in the default mailbox. I can do this for one e-mail along the following lines:

:0f
* ^Subject:.*(viagra|loan approval)
| formail -I "X-Category: Spam"

Okay, so far so good. But the problem I'm running in to is that once my filter identifies an e-mail as spam, and adds in a header identifying it as such, I'd like it to place the message in the default mailbox and then exit procmail. That is to say, my recipes are ordered in a significant way, so that once it is identified as spam, it would be problematic for a later recipe to evaluate whether it is spam or not. (Not to mention the added inefficiency of continuing going through all the recipes once we've already done with it what we want.)

I'm e-mailing you now because I'm not sure how to change this standard recipe formula so that once formail has added in this header, it places the mail in the default mail box and then exits procmail. I've examined the procmailrc man page, the archives of this mailing list, and the Web according to Google, but to no avail. Let me know if anyone can help out. Thanks!!

-morgan

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