3 # Test the behavior of post with multiple from addresses
8 if test -z "${MH_OBJ_DIR}"; then
9 srcdir=`dirname "$0"`/../..
10 MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR
13 . "${srcdir}/test/post/test-post-common.sh"
19 cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
20 From: Mr Nobody One <nobody1@example.com>, Mr Nobody Two <nobody2@example.com>
21 To: Somebody Else <somebody@example.com>
22 Subject: Test multi-from
24 This is a test of multi-from.
28 # Since this should fail, don't run fakesmtp
31 run_test "send -draft -server 127.0.0.1 -port $localport" \
32 "post: A Sender: or Envelope-From: header is required with multiple
34 post: re-format message and try again
35 send: message not delivered to anyone"
38 # This should also error
40 cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
41 From: Mr Nobody One <nobody1@example.com>, Mr Nobody Two <nobody2@example.com>
42 To: Somebody Else <somebody@example.com>
43 Subject: Test multi-from
46 This is a test of multi-from with blank Envelope-From.
49 run_test "send -draft -server 127.0.0.1 -port $localport" \
50 "post: Envelope-From cannot be blank when there is multiple From: addresses
52 post: re-format message and try again
53 send: message not delivered to anyone"