| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# Test the behavior of post with multiple recipients (& dcc) |
| 4 |
# |
| 5 |
|
| 6 |
set -e |
| 7 |
|
| 8 |
if test -z "${MH_OBJ_DIR}"; then |
| 9 |
srcdir=`dirname "$0"`/../.. |
| 10 |
MH_OBJ_DIR=`cd "$srcdir" && pwd`; export MH_OBJ_DIR |
| 11 |
fi |
| 12 |
|
| 13 |
. "${srcdir}/test/post/test-post-common.sh" |
| 14 |
|
| 15 |
# |
| 16 |
# Dcc test |
| 17 |
# |
| 18 |
cat > "${MH_TEST_DIR}/Mail/draft" <<EOF |
| 19 |
From: Mr Nobody <[email protected]> |
| 20 |
To: Somebody One <[email protected]>, |
| 21 |
Somebody Two <[email protected]> |
| 22 |
Subject: Test Dcc |
| 23 |
Dcc: Somebody Three <[email protected]> |
| 24 |
|
| 25 |
This is test of Dcc recipients. |
| 26 |
EOF |
| 27 |
|
| 28 |
cat > "${testname}.expected" <<EOF |
| 29 |
EHLO nosuchhost.example.com |
| 30 |
MAIL FROM:<[email protected]> |
| 31 |
RCPT TO:<[email protected]> |
| 32 |
RCPT TO:<[email protected]> |
| 33 |
RCPT TO:<[email protected]> |
| 34 |
DATA |
| 35 |
From: Mr Nobody <[email protected]> |
| 36 |
To: Somebody One <[email protected]>, |
| 37 |
Somebody Two <[email protected]> |
| 38 |
Subject: Test Dcc |
| 39 |
MIME-Version: 1.0 |
| 40 |
Content-Type: text/plain; charset="us-ascii" |
| 41 |
Date: |
| 42 |
|
| 43 |
This is test of Dcc recipients. |
| 44 |
. |
| 45 |
QUIT |
| 46 |
EOF |
| 47 |
|
| 48 |
test_post "${testname}.actual" "${testname}.expected" |
| 49 |
|
| 50 |
exit ${failed:-0} |