[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Exit status from programs (mailbox)



When delivering mail to a program, mailbox is documented to assume a
temporary failure and retry if the program dies with a signal, or to
assume a permanent error if a program exits with a non-zero return
code.  I believe this is inadequete, consider my .forward:

"|(cd ${HOME-/home/jch} && /usr/local/lib/mh/slocal -user ${USER-jch} || exit 75)"

I run MH's slocal to deliver mail into a folder in my +in tree.  If
this fails it is usually because of a full disk or one of the MH
binaries is missing or corrupted.  I don't want the mail returned in
this case, which explains the `|| exit 75', I'd like it requeued for
later retry.  I've also had problems with amd unmounting a partition
in the middle of a mail delivery for some reason, I'd also like this
retried. 

I propose to modify mailbox to honor the exit code if it is EX_TEMPFAIL
(i.e. requeue the message).  I believe this is the correct solution as
it would allow any user to run a sendmail compatible program that
returned EX_TEMPFAIL, instead of modifying router and scheduler.conf
to deliver mail to me properly.

Comments?

Thanks.

Jeff