1MH-MIME(7) Miscellaneous Information Manual MH-MIME(7)
2
3
4
6 mh-mime - overview of nmh MIME message composition and display
7
9 The acronym MIME stands for Multipurpose Internet Mail Extensions, the
10 format of Internet messages used to send multi-media content. The nmh
11 command suite has support for the display and composition of MIME mes‐
12 sages, but currently MIME support is not completely integrated into all
13 tools. This document provides an overview as to which tools support
14 MIME message display, storage, and composition.
15
16 Local Character Set Conversion
17 All of the nmh commands convert non-native character sets to the local
18 character set, as specified by the operating system locale settings.
19 See locale(1) for more details on the environment variables used to set
20 the local character set. Character set conversion will only take place
21 if nmh was built with iconv(3) support. See the mhparam(1) man page
22 for how to determine whether your nmh installation includes iconv(3)
23 support.
24
25 Depending on the source and target character set, it may not be possi‐
26 ble to convert all characters to the local character set. In this case
27 a substitution character will be used for the characters that cannot be
28 converted.
29
30 Message Display
31 The default format used by scan(1) will automatically decode MIME-
32 encoded headers. If you have a custom scan format, see the examples
33 provided with the nmh distribution (found in the “/etc/nmh” directory)
34 and mh-format(5) for details on how to make sure your MIME headers are
35 properly decoded.
36
37 By default, if show detects that it is reading a MIME message it will
38 invoke mhshow(1). The default behavior of mhshow is to only display
39 text parts that are not marked as attachments. See mhshow(1) for
40 details on how to control what mhshow will display.
41
42 Message Interrogation and Storage
43 The mhlist(1) command will display a listing of the MIME parts con‐
44 tained within a message. That information can be used in conjunction
45 with the mhstore command to save individual parts or content types of a
46 message. See mhlist(1) and mhstore(1) for more details on how these
47 commands work.
48
49 Message Composition and Reply
50 All messages sent by send(1) will automatically be processed by
51 mhbuild(1) before being passed to post(1) for message submission.
52 mhbuild will use the locale settings to mark text content with the
53 appropriate character set and apply any necessary encoding. If you
54 wish to include text in your message using a character set that does
55 not match your locale, you will need to specify the character set using
56 an mhbuild directive; see mhbuild(1) for more information.
57
58 For attaching files or composing other non-text content, there are two
59 options: the attach system and mhbuild directives.
60
61 The attach system is best suited for content where one or more files
62 are being attached to a message. You can use the attach system by
63 either using the attach command at the “What now?” prompt, or by
64 inserting an “Attach:” header in the message draft containing the name
65 of the file you wish to attach to the message (note that all the attach
66 command does is place an “Attach:” header in the message draft).
67 mhbuild will then automatically include the specified file(s) in the
68 outgoing message. See send(1) for details on how mhbuild determines
69 the proper content type of attached files.
70
71 The other method of composing MIME messages is to use mhbuild direc‐
72 tives. This allows exact control over the contents and format of the
73 MIME message, but has a more complicated syntax. mhbuild(1) contains
74 details on the directive syntax and examples of directives for differ‐
75 ent media types. It is important to note that when using mhbuild
76 directives the user must run mhbuild outside of send to have it process
77 directives; when being run by send, mhbuild is configured to not
78 process directives so normal user text is not mistaken for a directive.
79 When using directives a user typically uses the mime command at the
80 “What now?” prompt to process them.
81
82 When replying to messages using repl(1) the traditional MH method of
83 including the original text in the reply does not interoperate with
84 MIME messages. The -convertargs switch to repl(1) provides one solu‐
85 tion. Another solution: the contrib directory
86 (/usr/share/doc/nmh/contrib) contains a Perl program called replyfilter
87 which will decode text parts and present them in an appropriate manner
88 to be included in a message reply. See the comments at the top of
89 replyfilter for instructions on how to configure nmh to work with it.
90
91 Message Rewrite
92 The mhfixmsg(1) command can apply various transformations to MIME mes‐
93 sages, including decoding of text parts, converting the character set
94 of text parts, and insertion of text/plain parts to correspond to text
95 parts of other subtypes. mhfixmsg can also repair defects in MIME mes‐
96 sages, such as mismatched top-level boundary indicators and invalid
97 Content-Transfer-Encoding values.
98
100 comp(1), iconv(3), mh-format(5) mhbuild(1), mhfixmsg(1), mhparam(1),
101 nmh(7), repl(1), whatnow(1),
102 /usr/share/doc/nmh/contrib/replyfilter,
103 /usr/share/doc/nmh/contrib/replaliases
104
106 MIME support should be more integrated into all of the nmh tools than
107 it currently is.
108
109
110
111nmh-1.7.1 2014-12-15 MH-MIME(7)