procmail
[Top] [All Lists]

Re: procmail, a refiling program and the exitcode

1997-03-05 12:29:46
Stephane Bortzmeyer asked,

| Is it because I should have used 'w' in the recipe?

Yes, as Philip Guenther has already answered.  When the action line is a
pipe (either filtering or saving) and there is no `w' or `W' flag, procmail
ignores the exit code.  The purpose of `w' or `W' is specifically to make
procmail pay attention to the exit code of the command.

Specifically, without `w' or `W' procmail will consider the action successful
as long as the command named on the action line (or $SHELL if there are
shellmetas present) accepts the input.  I suppose that if you use `i' with
neither `w' nor `W', even that won't matter; procmail would then treat the
action as having failed only if it cannot run the command at all (or, if
there are shellmetas present, if it cannot run $SHELL).

<Prev in Thread] Current Thread [Next in Thread>