#!/bin/sh ###################################################### # # Test sendfrom # ###################################################### set -e if test -z "${MH_OBJ_DIR}"; then srcdir=`dirname "$0"`/../.. MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR fi . "${srcdir}/test/post/test-post-common.sh" # TEST start_test 'sendfrom, using -snoop' #### Set up profile to use sendfrom by adding a sendfrom-addr. This one adds #### -snoop to the send switches. The output from snoop is constant, and so #### is easily checked below. cat >> "$MH" < "${MH_TEST_DIR}/Mail/draft" < To: Somebody Else Subject: Test This is a test. EOF cat > "${testname}.expected" < RCPT TO: DATA From: Mr Nobody To: Somebody Else Subject: Test MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: This is a test. . QUIT EOF cat > "${testname}.post-expected" < EHLO nosuchhost.example.com <= 250-ready <= 250 I'll buy that for a dollar! => MAIL FROM: <= 250 I'll buy that for a dollar! => RCPT TO: <= 250 I'll buy that for a dollar! => DATA <= 354 Go ahead => . <= 250 Thanks for the info! => QUIT <= 221 Later alligator! EOF test_post "${testname}.actual" "${testname}.expected" \ 2> ${testname}.post check "${testname}.post-expected" "${testname}.post" finish_test exit ${failed:-0}