procmail
[Top] [All Lists]

Re: problems with receipe - I always get Non-zero exitcode (1) from " test -f $BLACKLIST && $FORMAIL -zxFrom: -zxReply-To: | egrep -i -f $BLACKLIST"

2002-02-27 14:17:33
Manuel Hendel <Manuel(_dot_)Hendel(_at_)easygolucky(_dot_)de> writes:
On Wed, Feb 27, 2002 at 02:46:14AM -0600, Philip Guenther wrote:
     BLACKLIST = $HOME/.procmail/blacklist

I changed it to the line above, this doesn't bring any changes.

Okay, looking again at your original post I see that the condition line
got wrapped and thereby broken into two conditions:

:0:
* ? test -f $BLACKLIST && $FORMAIL -zxFrom: -zxReply-To: | egrep -i -f
* $BLACKLIST
$MAILDIR/mail-blacklist

So, you need to make that one condition, perhaps wrapping the line with
a blackslash-newline pair.

I also recommend _against_ using variables like FORMAIL to store paths
to commands that are in the normal search.  Just use "formail" and let
PATH do its job.  Also, you only need to use formail's -z flag once and
it'll be applied to all of formail's output.  Writing it they you have
above makes it look like you think it applies to only that -x option.
Finally, there's no need to prepend the mailbox name with $MAILDIR,
as that's the default for relative paths.

So:
        :0:
        * ? test -f $BLACKLIST && \
            formail -z -xFrom: -xReply-To: | egrep -i -f $BLACKLIST
        mail-blacklist

You may also want to put
        SHELL = /bin/sh
at the top of the rcfile, to avoid problems if your normal shell does
not behave like the Bourne shell.


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail