3 # Test the behavior of post with multiple recipients and the use of Bcc:
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"
18 # It's worth pointing out here what's going on the SMTP protocol.
20 # If there are both sighted and unsighted addresses in the address list,
21 # post calls verify_all_addresses() which results in ALL recipient
22 # addresses being attempted, then the SMTP connection is reset, then
23 # both the sighted and unsigned messages are sent (in different SMTP
24 # transactions). Apparantly post has always done it this way.
27 cat > "${MH_TEST_DIR}/Mail/draft" <<EOF
28 From: Mr Nobody <nobody@example.com>
29 To: Somebody One <somebody1@example.com>,
30 Somebody Two <somebody2@example.com>
32 Bcc: Somebody Three <somebody3@example.com>,
33 Somebody Four <somebody4@example.com>
35 This is test of Bcc recipients.
38 cat > "${testname}.expected" <<EOF
39 EHLO nosuchhost.example.com
40 MAIL FROM:<nobody@example.com>
41 RCPT TO:<somebody1@example.com>
42 RCPT TO:<somebody2@example.com>
43 RCPT TO:<somebody3@example.com>
44 RCPT TO:<somebody4@example.com>
46 MAIL FROM:<nobody@example.com>
47 RCPT TO:<somebody1@example.com>
48 RCPT TO:<somebody2@example.com>
50 From: Mr Nobody <nobody@example.com>
51 To: Somebody One <somebody1@example.com>,
52 Somebody Two <somebody2@example.com>
56 This is test of Bcc recipients.
59 MAIL FROM:<nobody@example.com>
60 RCPT TO:<somebody3@example.com>
61 RCPT TO:<somebody4@example.com>
63 From: Mr Nobody <nobody@example.com>
68 ------- Blind-Carbon-Copy
70 From: Mr Nobody <nobody@example.com>
71 To: Somebody One <somebody1@example.com>,
72 Somebody Two <somebody2@example.com>
76 This is test of Bcc recipients.
78 ------- End of Blind-Carbon-Copy
83 test_post "${testname}.actual" "${testname}.expected"