From bd97a33d177754d4260fd21c5f6751a486eb3eed Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Sun, 23 Sep 2007 23:08:33 +0200 Subject: [PATCH 1/1] fix resubmit script --- bin/resubmit | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bin/resubmit b/bin/resubmit index 5ef8237..2e4896d 100755 --- a/bin/resubmit +++ b/bin/resubmit @@ -2,12 +2,16 @@ set -eu PROCMAIL=$HOME/.etc/mailfilter/procmail/procmailrc -FORMAIL="formail -I 'X-Resubmitted: $(date -R)'" +FORMAIL="/usr/bin/formail -I'X-Resubmitted: $(date -R)'" if [ -z "${1:-}" ]; then $FORMAIL | exec $PROCMAIL else - $FORMAIL "$1" | $PROCMAIL && rm -f "$1" + if [ ! -f "$1" ]; then + echo "E: no such file: $1" >&2 + exit 1 + fi + eval $FORMAIL < "$1" | $PROCMAIL && rm -f "$1" fi exit 0 -- 2.39.2