-# check with address
-# Replace post:
-cat >"$MH_TEST_DIR/Mail/notpost" <<EOF
-if grep '^Resent-From: ' "\$2" >/dev/null; then
- cp "\$2" "$actual"
-else
- printf 'post: message has no Resent-From: header\n'
- printf 'post: See default components files for examples\n'
- printf 'post: re-format message and try again\n'
- exit 1
-fi
-EOF
-chmod u+x "$MH_TEST_DIR/Mail/notpost"
-sed 's/postproc:.*/#:/' "$MH" > "${MH}-new"
-printf "postproc: $MH_TEST_DIR/Mail/notpost\n" >>"${MH}-new"
-mv -f "${MH}-new" "$MH"
+#### Use sendmail/pipe below to override default mts.
+mts_fakesendmail="${MHMTSCONF}-fakesendmail"
+sed -e 's/^mts:.*/mts: sendmail\/pipe/' "${MHMTSCONF}" > "$mts_fakesendmail"
+printf 'sendmail: %s/test/fakesendmail\n' "$srcdir" >>"$mts_fakesendmail"
+MHMTSCONF="$mts_fakesendmail"
+
+# arguments: rcvdist switches
+test_rcvdist ()
+{
+ $rcvdist "$@"
+
+ # fakesendmail drops the message and any cc's into this mbox.
+ mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox
+ inc -silent -file "$mbox"
+ rm -f "$mbox" "$mbox.map"
+
+ # It's hard to calculate the exact Date: header post is going to
+ # use, so we'll just use sed to remove the actual date so we can
+ # easily compare it against our "correct" output.
+ sed -e 's/^Resent-Date:.*/Resent-Date:/' `mhpath last` > "$actual"
+
+ check "$expected" "$actual"
+}