X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/eddb5ee317cb1d447bc5d9fa74de6287f2838a59..bd01be7c73f0cb65d39bee92874a8d1b2957c852:/bin/resubmit

diff --git a/bin/resubmit b/bin/resubmit
index 01990b2..8405e77 100755
--- a/bin/resubmit
+++ b/bin/resubmit
@@ -3,8 +3,10 @@ set -eu
 
 PROCMAIL=$HOME/.etc/mailfilter/procmail/procmailrc
 
-if [ -z "$1" ]; then
+if [ -z "${1:-}" ]; then
   cat | exec $PROCMAIL
 else
-  exec $PROCMAIL < "$1"
+  $PROCMAIL < "$1" && rm -f "$1"
 fi
+
+exit 0