send -draft -server 127.0.0.1 -port $localport || exit 1
- wait $!
+ wait ${pid}
#
# It's hard to calculate the exact Date: header post is going to
# compare it against our "correct" output.
#
- sed -i.bak -e 's/^Date:.*/Date:/' "$1"
+ sed -e 's/^Date:.*/Date:/' "$1" > "$1".nodate
+ rm -f "$1"
- rm -f "${1}.bak"
-
- check "$1" "$2"
+ check "$1".nodate "$2"
}