procmail
[Top] [All Lists]

Re: Bouncing/refusing mail with EXITCODE

1997-04-21 01:40:00
"Roderick" == Roderick Schertler <roderick(_at_)argon(_dot_)org> writes:

Roderick> Alas, this doesn't work. All the bourne-like shells I know
Roderick> (including sh, zsh and bash) never return from the exec,
Roderick> even if it fails.

Roderick>     $ sh -c 'exec nonesuch || echo here'; echo returned $?
Roderick> exec: nonesuch: not found returned 1

On the command line, bash reacts like:
abacus(42):~$ exec nonesuch || echo here
exec: nonesuch: not found
here

But that's only in interactive shells. I have seen more elaborate
.forward files (I'm making this up right now):
"| IFS=' ' && p=/usr/local/bin/procmail && if [ -x $p ]; then $p -Yf-;
else exit 75; fi # revjack"

(This should be one line.)

-- 
Guy Geens <ggeens(_at_)iname(_dot_)com>
Home Page: http://www.elis.rug.ac.be/~ggeens
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver)