]> diplodocus.org Git - nmh/blobdiff - man/mhfixmsg.man
Merge branch 'pop-stls'
[nmh] / man / mhfixmsg.man
index 5dd12bf18d663238993c3670a1fda63ea814d952..0a885331b815b54048f1d8274c4ced663ba40052 100644 (file)
@@ -1,4 +1,4 @@
-.TH MHFIXMSG %manext1% 2016-11-08 "%nmhversion%"
+.TH MHFIXMSG %manext1% 2019-03-31 "%nmhversion%"
 .
 .\" %nmhwarning%
 .
@@ -20,6 +20,9 @@ mhfixmsg \- nmh's MIME-email rewriter with various transformations
 .BR \-nodecodetext ]
 .RB [ \-decodetypes
 .IR "type/[subtype][,...]" ]
+.RB [ \-decodeheaderfieldbodies
+utf-8 |
+.BR \-nodecodeheaderfieldbodies ]
 .RB [ \-crlflinebreaks " | " \-nocrlflinebreaks ]
 .RB [ \-textcharset
 .I charset
@@ -28,6 +31,7 @@ mhfixmsg \- nmh's MIME-email rewriter with various transformations
 .RB [ \-replacetextplain " | " \-noreplacetextplain ]
 .RB [ \-fixboundary " | " \-nofixboundary ]
 .RB [ \-fixcte " | " \-nofixcte ]
+.RB [ \-checkbase64 " | " \-nocheckbase64 ]
 .RB [ \-fixtype
 .IR mimetype ]
 .RB [ \-outfile
@@ -71,7 +75,7 @@ then the part is not decoded (and a message will be displayed if
 .B \-verbose
 is enabled).  Note that
 .B \-decodetext
-binary can produce messages that are not RFC 2045 compliant.
+binary can produce messages that are not compliant with RFC 5322, \(sc2.1.1.
 .PP
 When the
 .B \-decodetext
@@ -97,6 +101,18 @@ to restrict
 .B \-decodetext
 to just text/plain parts.
 .PP
+The
+.B \-decodeheaderfieldbodies
+switch enables decoding of UTF-8 header field bodies, when supplied
+with its mandatory
+.I utf-8
+argument.  The
+.B \-nodecodeheaderfieldbodies
+inhibits this transformation.  The transformation can produce a message
+that does not conform with RFC 2047, \(sc1, paragraph 6, because the decoded
+header field body could contain unencoded non-ASCII characters.  It is
+therefore not enabled by default.
+.PP
 By default, carriage return characters are preserved or inserted at
 the end of each line of text content.  The
 .B \-crlflinebreaks
@@ -105,7 +121,7 @@ switch selects this behavior and is enabled by default.  The
 switch causes carriage return characters to be stripped from, and not
 inserted in, text content when it is decoded and encoded.  Note that
 its use can cause the generation of MIME messages that do not conform
-to RFC 2046, §4.1.1, paragraph 1.
+with RFC 2046, \(sc4.1.1, paragraph 1.
 .PP
 The
 .B \-textcharset
@@ -191,7 +207,7 @@ The
 switch enables a transformation to change the
 Content-Transfer-Encoding from an invalid value to 8-bit in message
 parts with a Content-Type of multipart and message, as required by
-RFC 2045, §6.4.  That condition is indicated by a \*(lqmust be
+RFC 2045, \(sc6.4.  That condition is indicated by a \*(lqmust be
 encoded in 7bit, 8bit, or binary\*(rq error message from
 .B mhlist
 and other
@@ -199,6 +215,21 @@ and other
 programs that parse MIME messages.
 .PP
 The
+.B \-checkbase64
+switch enables a check of the encoding validity in base64-encoded
+MIME parts.  The check looks for a non-encoded text footer appended
+to a base64-encoded part.  Per RFC 2045 \(sc6.8, the occurrence of
+a "=" character signifies the end of base-64 encoded content.  If
+none is found, a heuristic is used:  specifically, two consecutive
+invalid base64 characters signify the beginning of a plain text
+footer.  If a text footer is found and this switch is enabled,
+.B mhfixmsg
+separates the base64-encoded and non-encoded content and places
+them in a pair of subparts to a newly constructed multipart/mixed
+part.  That multipart/mixed part replaces the original base64-encoded
+part in the MIME structure of the message.
+.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
@@ -294,15 +325,17 @@ content type and/or encoding as follows:
 .PP
 .RS 5
 .nf
-.ta \w'\-crlflinebreaks 'u
-\-decodetext         base64 and quoted-printable encoded text parts
-\-decodetypes        limits parts to which -decodetext applies
-\-crlflinebreaks     text parts
-\-textcharset        text/plain parts
-\-reformat           text parts that are not text/plain
-\-fixboundary        outermost multipart part
-\-fixcte             multipart or message part
-\-fixtype            all except multipart and message parts
+.ta \w'\-decodeheaderfieldbodies 'u
+\-decodetext              base64 and quoted-printable encoded text parts
+\-decodetypes             limits parts to which -decodetext applies
+\-decodeheaderfieldbodies all message parts
+\-crlflinebreaks          text parts
+\-textcharset             text/plain parts
+\-reformat                text parts that are not text/plain
+\-fixboundary             outermost multipart part
+\-fixcte                  multipart or message part
+\-checkbase64             base64 encoded parts
+\-fixtype                 all except multipart and message parts
 .fi
 .RE
 .SS "Backup of Original Message/File"
@@ -529,12 +562,14 @@ is checked.
 .RB ` msgs "' defaults to cur"
 .RB ` "\-decodetext 8bit"'
 .RB ` "\-decodetypes text,application/ics"'
+.RB ` \-nodecodeheaderfieldbodies '
 .RB ` \-crlflinebreaks '
 .RB ` \-notextcharset '
 .RB ` \-reformat '
 .RB ` \-noreplacetextplain '
 .RB ` \-fixboundary '
 .RB ` \-fixcte '
+.RB ` \-checkbase64 '
 .RB ` \-changecur '
 .RB ` \-noverbose '
 .fi