+#### Use fakesmtp for this first test.
+# check post switch with argument
+start_test 'post switch with argument'
+
+cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
+From: Mr Nobody <nobody@example.com>
+To: Somebody Else <somebody@example.com>
+Subject: Test
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Date: Sun, 14 Jan 2018 12:00:00 -0500
+
+This is a test.
+EOF
+
+cat > "${testname}.expected" <<EOF
+EHLO nosuchhost.example.com
+MAIL FROM:<somebody@example.com>
+RCPT TO:<somebody@example.com>
+DATA
+From: Mr Nobody <nobody@example.com>
+To: Somebody Else <somebody@example.com>
+Subject: Test
+MIME-Version: 1.0
+Content-Type: text/plain; charset="us-ascii"
+Date:
+Resent-To: somebody@example.com
+Resent-From: Somebody Else <somebody@example.com>
+Resent-Date:
+
+This is a test.
+.
+QUIT
+EOF
+
+cat > "$MH_TEST_DIR/Mail/rcvdistcomps" <<'EOF'
+%(lit)%(formataddr{addresses})\
+%<(nonnull)%(void(width))%(putaddr Resent-To:)%>
+%(lit)%(formataddr{to})\
+%<(nonnull)%(void(width))%(putaddr Resent-From:)\n%>
+EOF
+
+# Set this for the EHLO command
+echo "clientname: nosuchhost.example.com" >> ${MHMTSCONF}
+
+# $1: message draft file
+# $2: output filename for fakesmtp, i.e., the sent message
+test_post ()
+{
+ pid=`"${MH_OBJ_DIR}/test/fakesmtp" "$2" $localport`
+
+ run_prog $rcvdist -form "$MH_TEST_DIR/Mail/rcvdistcomps" -server 127.0.0.1 -port $localport somebody@example.com <$1
+
+ sed -e 's/^Date:.*/Date:/' -e 's/^Resent-Date:.*/Resent-Date:/' "$2" > "$2".nodate
+ rm -f "$2"
+
+ check "$2".nodate "$3"
+}
+
+test_post "${MH_TEST_DIR}/Mail/draft" "${testname}.fakesmtp" "${testname}.expected"
+