procmail
[Top] [All Lists]

Evaluating filter exitcodes

2003-11-09 05:03:40
Hi!

I'm trying to make procmail *stop* processing it's rules when a filter produces an exitcode other than 0 ... But it currently isn't working ;-)

The filter does not just exit with exitcode != 0, it also spits out the message it was trying to process, which procmail then picks up again to do further processing, which is not what I want.

Currently the snippet looks like this:

# Handle postmaster and abuse filtering
INCLUDERC=$HOME/Procmail/rc.masters

# Head off to do some white/blacklist comparison
:0 w
| /path/to/filter

:0e
{
   EXITCODE=$?
}

#  Continue with sorting for maillinglists/friends etc
INCLUDERC=$HOME/Procmail/rc.subscriptions
INCLUDERC=$HOME/Procmail/rc.friends

What happens is that messages from email addresses in my blacklist are being processed by the last two INCLUDERC statements, since the filter spits it out on stdout. I would like to prevent the last two INCLUDERC's from being processed if the EXITCODE != 0 ... Any idea how ?

Gr,

Nils.

--
Simple guidelines to happiness:
Work like you don't need the money,
love like your heart has never been broken and dance like no one can see you.



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