Brian Dawson asked,
| Hello all, I have searched through the archive, but couldn't find anything
| relevant to my question. What I am interested in is being able to have
| procmail use a recipe not only based upon egrep of the mail header, but to
| also have the possibility to have a condition met based upon either the exit
| code of a process, or a return value.
Yes, procmail can do both.
To test if a process returns success (exit code 0), write a condition like
this:
* ? command
or to test for failure,
* ! ? command
To test for contents of a return value,
some_variable=`command`
:0 flags
* some_variable ?? regexp
action