X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/a376784b51d76aee169b9f358bc7ccef9d70a04a..ab8c4cfdc5e9b8b7bb38d5b49f43e006bd2df7aa:/test/mhmail/test-mhmail diff --git a/test/mhmail/test-mhmail b/test/mhmail/test-mhmail index 27188c77..ff9fd40b 100755 --- a/test/mhmail/test-mhmail +++ b/test/mhmail/test-mhmail @@ -14,16 +14,18 @@ fi . "${srcdir}/test/post/test-post-common.sh" -# Find MIME type string, using mimetypeproc if configured with it. +# Find MIME type string, using configured procs if available. MIMETYPEPROC=`mhparam mimetypeproc` +MIMEENCODINGPROC=`mhparam mimeencodingproc` content_type_string() { - if test -z "$MIMETYPEPROC"; then + if test -z "$MIMETYPEPROC" -o -z "$MIMEENCODINGPROC"; then + #### This should be the order of name and charset. echo "text/plain; name=\"`basename $1`\"; charset=\"us-ascii\"" else - # 1) Excise leading filename followed by : and any whitespace. - # 2) Wrap charset value in double quotes. Assume that it isn't already. - printf "%s%s" \ - `$MIMETYPEPROC $1` "; name=\"`basename $1`\"; charset=\"us-ascii\"" + #### Excise any leading filename followed by : and whitespace. + printf '%s; charset="%s"; name="%s"' \ + `$MIMETYPEPROC $1 | sed -e 's/.*: *//'` \ + `$MIMEENCODINGPROC $1 | sed -e 's/.*: *//'` `basename $1` fi } @@ -290,6 +292,8 @@ RCPT TO: DATA To: recipient@example.com From: sender8@localhost +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" Date: Message-ID: