procmail
[Top] [All Lists]

Re: Deleting high-scoring SPAM

2003-12-22 20:58:33
Wendell Dingus wrote:

I still get a message with blank subject and blank body.

spamc | procmail -m -p delete-high.rc | qmail-queue.original

> The delete-high.rc file contains:
>
> :0:
> * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*
> /dev/null
>
> :0
> |

Your pipeline invokes qmail-queue.original whether it gets non-null output from procmail or not. Change it to

 spamc | procmail -p -m PATH=$PATH delete-high.rc

(not sure whether you need the PATH assignment, but I know that using -p and -m together strips out a lot of the environment) and finish the pipe inside the rcfile by changing the last recipe to this:

:0
| qmail-queue.original

That way, qmail-queue.original will be run only when procmail hasn't trashed the message.

By the way, you don't need a second colon on a dump to /dev/null. Later versions of procmail recognize it as a special case and don't bother trying to get a local lockfile; that's why you aren't seeing errors about being unable to lock /dev/null.lock.


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