X-Git-Url: https://git.madduck.net/etc/mailfilter.git/blobdiff_plain/b3c3c1782c5bd56cc75b5f13bc8804f3db12fa6b..af8fc020f8ff0c1b61e2e82ea4d11c74782f5a60:/bin/resubmit diff --git a/bin/resubmit b/bin/resubmit index 62d9720..52967a5 100755 --- a/bin/resubmit +++ b/bin/resubmit @@ -54,9 +54,9 @@ if [ "$mark_read" -eq 1 ]; then PROCMAIL="$PROCMAIL DELIVER_READ=1" fi -# execute the date -R only during the eval, not immediately -FILTER="sed -rne ':b;s/^Received:/&/;tf;p;n;bb' -e ':f;iReceived: by resubmission script; $(date -R)' -e ':e;p;n;be'" -FILTER="$FILTER | /usr/bin/formail -I'X-Resubmitted: $(date -R)'" +DATE_R="$(date -R)" +FILTER="sed -rne ':b;s/^(Received|Date):/&/;tf;p;n;bb' -e ':f;iReceived: by resubmission script; $DATE_R' -e ':e;p;n;be'" +FILTER="$FILTER | /usr/bin/formail -I'X-Resubmitted: $DATE_R'" if [ -z "${files:-}" ] && [ $list -eq 0 ]; then eval $FILTER | exec $PROCMAIL