procmail
[Top] [All Lists]

Re: variables

2002-10-09 16:49:42
You can do it for 0 or 1, with I think the W flag, and a conditional
recipe flag.

The only way to do it is with a shell script rapper:

#!/bin/sh
cat - | /some/directory/bin/filter_program
echo $?
exit 0

Then, in procmail:

:0 W
* ...
var = | /some/directory/bin/filter_rapper

:0
* $var ?? 1
{ ... }

and so on.

Luke


On Wed, 9 Oct 2002, Tom Allison wrote:

Is there some way that I can do something that looks like this:

| /usr/bin/foo  #This is a filter that returns an exit code
EXITCODE=$?

And then, based on the exit code, either send the email to the
default delivery point or to an alternate (like /dev/null).

Also, it is possible to do this not simply on a True/False
conditional test, but something of a select statement where I can
address three possible conditions?

Or is there some different way that might be easier to do?


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