X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/8511ca2740a542325b103553a15d157239965103..1a2ef2eed6ab723cbf2280c01cb6e1a0500d4001:/test/post/test-post-aliases?ds=sidebyside diff --git a/test/post/test-post-aliases b/test/post/test-post-aliases index 664346df..bd9123ec 100755 --- a/test/post/test-post-aliases +++ b/test/post/test-post-aliases @@ -22,6 +22,7 @@ named.list; one@example.com, two@example.com one: one@example.com two: two@example.com three: three@example.com +four: Mister Four EOF #### Rely on sendmail/smtp or sendmail/pipe below to override default mts. @@ -40,7 +41,7 @@ test_alias () # fakesendmail drops the message and any cc's into this mbox. mbox="${MH_TEST_DIR}"/Mail/fakesendmail.mbox inc -silent -file "$mbox" - rm -f "$mbox" "$mbox.map" + rm -f "$mbox" # It's hard to calculate the exact Date: header post is going to # use, so we'll just use sed to remove the actual date so we can easily @@ -158,5 +159,61 @@ EOF test_alias sendmail/pipe "${testname}.expected" +# check that alias expansion happens in the From: line when doing a bcc +cat >"${MH_TEST_DIR}/Mail/draft" <"${testname}.expected" < +RCPT TO: +RCPT TO: +RSET +MAIL FROM: +RCPT TO: +DATA +From: Mister Four +To: one@example.com +Subject: from bcc expansion test +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Date: + +This is test of from line expansion for a bcc. +. +RSET +MAIL FROM: +RCPT TO: +DATA +From: Mister Four +Date: +Subject: from bcc expansion test +BCC: + +------- Blind-Carbon-Copy + +From: Mister Four +To: one@example.com +Subject: from bcc expansion test +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Date: + +This is test of from line expansion for a bcc. + +------- End of Blind-Carbon-Copy +. +QUIT +EOF + +test_post "${testname}.actual" "${testname}.expected" \ + "-alias ${MH_TEST_DIR}/Mail/aliases" + exit ${failed:-0}