procmail
[Top] [All Lists]

pipes, exit codes, and "else" recipes

2004-01-11 23:24:34
Hi, I'm having some trouble getting an "else-clause" recipe to execute
when a program in a pipe action line returns a nonzero exit code.  For
instance:

:0
| /bin/false

:0e
$HOME/some.maildir/

Am I wrong in expecting that when the program receiving the pipe
fails, that should be considered a failed action by procmail?  What
other ways are there to execute an alternate recipe when the piped-to
program fails?

Specifically, what I want to do is deliver my personal email to my
home box by way of SSH.  Something like this:

:0
* ^X-Spam-Score: S
/dev/null

:0
| $HOME/bin/deliver-ssh

:0e
$DEFAULT

...where deliver-ssh will use a nonzero exit code when something bad
happens (e.g. the destination host is unreachable by SSH.)

Anyway, if anyone knows a good way to do this, please let me know.
Also any specific documentation, suggestions or advice would be
welcome. 

Thanks,
 Allister

-- 
Allister MacLeod <amacleod(_at_)mv3d(_dot_)com> | http://amacleod.is-a-geek.org/
 Elen síla lúmenn'omentielvo.

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