--- /dev/null
+# test spost: bcc and dcc headers
+
+. "$MH_TEST_COMMON"
+
+
+draft="$MH_TEST_DIR/spost-$$.draft"
+
+profile="$MMH/profile-spost"
+cd "$MMH"
+cat "`mhparam profile`" - >"$profile" <<!
+default-from: Bob <bob@example.org>
+!
+cd -
+export MMHP="$profile"
+
+
+# to + cc headers
+
+cat >"$draft" <<!
+To: alice, gill
+Cc: jack, charly
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and cc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+To: alice, gill
+Cc: jack, charly
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and cc
+From: Bob <bob@example.org>
+
+foo
+----EOM----
+jack
+charly
+alice
+gill
+!
+
+
+
+# to + bcc headers
+
+cat >"$draft" <<!
+To: alice
+Bcc: john, paul, george, ringo
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and bcc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and bcc
+From: Bob <bob@example.org>
+
+foo
+----EOM----
+alice
+!
+
+
+
+
+
+# only bcc headers
+
+cat >"$draft" <<!
+Bcc: john, paul, george, ringo
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: only bcc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: only bcc
+From: Bob <bob@example.org>
+Bcc: undisclosed-recipients:;
+
+foo
+----EOM----
+!
+
+
+
+
+# to + dcc headers
+
+cat >"$draft" <<!
+To: alice
+Dcc: john, paul, george, ringo
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and dcc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+To: alice
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: to and dcc
+From: Bob <bob@example.org>
+
+foo
+----EOM----
+john
+paul
+george
+ringo
+alice
+!
+
+
+
+# only dcc headers
+
+cat >"$draft" <<!
+Dcc: john, paul, george, ringo
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: only dcc
+----------------
+foo
+!
+
+runandcheck 'spost -debug "$draft"' <<!
+Date: Sun, 25 Oct 2015 18:59:56 +0100
+Subject: only dcc
+From: Bob <bob@example.org>
+Bcc: undisclosed-recipients:;
+
+foo
+----EOM----
+john
+paul
+george
+ringo
+!
+
{ "Subject", HSUB, 0 },
{ "To", HADR|HTRY, MVIS },
{ "Cc", HADR|HTRY, MVIS },
- { "Dcc", HADR|HTRY|HDCC, MVIS },
+ { "Dcc", HADR|HTRY|HDCC, MINV },
{ "Bcc", HADR|HTRY|HBCC, MINV },
{ "Message-Id", HBAD, 0 },
{ "Fcc", HFCC, 0 },
{ "Resent-Subject", HSUB, 0 },
{ "Resent-To", HADR|HTRY, MVIS },
{ "Resent-Cc", HADR|HTRY, MVIS },
- { "Resent-Dcc", HADR|HTRY|HDCC, MVIS },
+ { "Resent-Dcc", HADR|HTRY|HDCC, MINV },
{ "Resent-Bcc", HADR|HTRY|HBCC, MINV },
{ "Resent-Message-Id", HBAD, 0 },
{ "Resent-Fcc", HFCC, 0 },