From f2f6f08eee1d6b084221f9899c4472e6f57230b7 Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 21 Jul 2012 12:01:41 -0500 Subject: [PATCH] If post or send fail, exit with their exit status. --- uip/mhmail | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uip/mhmail b/uip/mhmail index bfcfe89..945767a 100755 --- a/uip/mhmail +++ b/uip/mhmail @@ -272,10 +272,10 @@ Nmh-Attachment: ${arg} if "${post_or_send}" "${tmpfile}" ${postsendargs}; then exit else + status=$? + mv -f "${tmpfile}" dead.letter printf "Letter saved in dead.letter\n" - #### exec skips the trap set above. - [ "${tmpfileresent}" ] && rm -f "${tmpfileresent}" - exec mv "${tmpfile}" dead.letter + exit $status fi fi fi -- 1.7.10.4