-.TH MHFIXMSG %manext1% "November 30, 2014" "%nmhversion%"
+.TH MHFIXMSG %manext1% "February 20, 2016" "%nmhversion%"
.\"
.\" %nmhwarning%
.\"
.RB [ \-decodetext
8bit/7bit |
.BR \-nodecodetext ]
+.RB [ \-decodetypes
+.IR "type/[subtype][,...]" ]
.RB [ \-textcharset
.I charset
.RB "| " \-notextcharset ]
.RB [ \-replacetextplain " | " \-noreplacetextplain ]
.RB [ \-fixboundary " | " \-nofixboundary ]
.RB [ \-fixcte " | " \-nofixcte ]
+.RB [ \-fixtype
+.IR mimetype ]
.RB [ \-outfile
.IR outfile ]
.RB [ \-rmmproc
ISO-8859-x, UTF-8, or Windows-12xx.
.PP
The
+.B \-decodetypes
+switch specifies the message parts, by type and optionally subtype,
+to which
+.B \-decodetext
+applies. Its argument is a comma-separated list of type/subtype
+elements. If an element does not contain a subtype, then
+.B \-decodetext
+applies to all subtypes of the type. The default is
+.B \-decodetypes
+.IR text ;
+it can be overridden, e.g., with
+.B \-decodetypes
+.I text/plain
+to restrict
+.B \-decodetext
+to just text/plain parts.
+.PP
+The
.B \-textcharset
switch specifies that all text/plain parts of the message(s)
should be converted to
multipart/alternative part, if present. If not, it creates a
multipart/alternative part.
.PP
+With the
+.B \-reformat
+switch, multipart/related parts are handled differently than
+multipart/alternative. If the multipart/related has only a single
+part that is not text/plain and can be converted to text/plain, a
+text/plain part is added and the type of the part is changed to
+multipart/alternative. If the multipart/related has more than one
+part but does not have a text/plain part,
+.B mhfixmsg
+tries to add one.
+.PP
The
.B \-replacetextplain
switch broadens the applicability of
.B nmh
programs that parse MIME messages.
.PP
+The
+.B \-fixtype
+switch ensures that each part of the message has the correct MIME type
+shown in its Content-Type header. It may be repeated. It is
+typically used to replace \*(lqapplication/octet-stream\*(rq with a
+more descriptive MIME type. It may not be used for multipart and
+message types.
+.PP
.B mhfixmsg
applies one transformation unconditionally: it removes an extraneous
trailing semicolon from the parameter lists of MIME header fields.
.nf
.ta \w'\-fixboundary 'u
\-decodetext base64 and quoted-printable encoded text parts
+\-decodetypes limits parts to which -decodetext applies
\-textcharset text/plain parts
\-reformat text parts that are not text/plain
\-fixboundary outermost multipart part
\-fixcte multipart part
+\-fixtype all except multipart and message parts
.fi
.RE
.PP
.RB ` +folder "' defaults to the current folder"
.RB ` msgs "' defaults to cur"
.RB ` "\-decodetext 8bit"'
+.RB ` "\-decodetypes text"'
.RB ` \-notextcharset '
.RB ` \-reformat '
.RB ` \-noreplacetextplain '