]> diplodocus.org Git - nmh/blob - man/mh-mime.man
new.c: Order two return statements to match comment.
[nmh] / man / mh-mime.man
1 .TH MH\-MIME %manext7% 2014-12-15 "%nmhversion%"
2 .
3 .\" %nmhwarning%
4 .
5 .SH NAME
6 mh\-mime \- overview of nmh MIME message composition and display
7 .\"
8 .SH DESCRIPTION
9 The acronym MIME stands for Multipurpose Internet Mail Extensions, the
10 format of Internet messages used to send multi-media content.
11 The
12 .B nmh
13 command suite has support for the display and composition of MIME messages, but
14 currently MIME support is not completely integrated into all tools. This
15 document provides an overview as to which tools support MIME message display,
16 storage, and composition.
17 .SS
18 Local Character Set Conversion
19 All of the
20 .B nmh
21 commands convert non-native character sets to the local character set,
22 as specified by the operating system locale settings. See
23 .IR locale (1)
24 for more details on the environment variables used to set the
25 local character set. Character set conversion will only take place if
26 .B nmh
27 was built with
28 .IR iconv (3)
29 support. See
30 .IR mhparam (1)
31 for how to determine whether your
32 .B nmh
33 installation includes
34 .IR iconv (3)
35 support.
36 .PP
37 Depending on the source and target character set, it may not be possible
38 to convert all characters to the local character set. In this case a
39 substitution character will be used for the characters that cannot be
40 converted.
41 .SS
42 Message Display
43 The default format used by
44 .IR scan (1)
45 will automatically decode MIME-encoded headers. If you have a custom
46 .B scan
47 format, see the examples provided with the
48 .B nmh
49 distribution (found in the
50 .RI \*(lq %nmhetcdir% \*(rq
51 directory) and
52 .IR mh\-format (5)
53 for details on how to make sure your MIME headers are properly decoded.
54 .PP
55 By default, if
56 .B show
57 detects that it is reading a MIME message it will invoke
58 .IR mhshow (1).
59 The default behavior of
60 .B mhshow
61 is to only display text parts that are not marked as attachments. See
62 .IR mhshow (1)
63 for details on how to control what
64 .B mhshow
65 will display.
66 .SS
67 Message Interrogation and Storage
68 The
69 .IR mhlist (1)
70 command will display a listing of the MIME parts contained within a
71 message. That information can be used in conjunction with the
72 .B mhstore
73 command to save individual parts or content types of a message. See
74 .IR mhlist (1)
75 and
76 .IR mhstore (1)
77 for more details on how these commands work.
78 .SS
79 Message Composition and Reply
80 All messages sent by
81 .IR send (1)
82 will automatically be processed by
83 .IR mhbuild (1)
84 before being passed to
85 .IR post (1)
86 for message submission.
87 .B mhbuild
88 will use the locale settings to mark text content with the appropriate
89 character set and apply any necessary encoding. If you wish to include
90 text in your message using a character set that does not match your
91 locale, you will need to specify the character set using an
92 .B mhbuild
93 directive; see
94 .IR mhbuild (1)
95 for more information.
96 .PP
97 For attaching files or composing other non-text content, there are two options:
98 the attach system and
99 .B mhbuild
100 directives.
101 .PP
102 The attach system is best suited for content where one or more files are
103 being attached to a message. You can use the attach system by either
104 using the
105 .B attach
106 command at the \*(lqWhat now?\*(rq prompt, or by inserting an \*(lqAttach:\*(rq
107 header in the message draft containing the name of the file you wish to
108 attach to the message (note that all the
109 .B attach
110 command does is place an \*(lqAttach:\*(rq header in the message draft).
111 .B mhbuild
112 will then automatically include the specified file(s) in the outgoing
113 message. See
114 .IR send (1)
115 for details on how
116 .B mhbuild
117 determines the proper content type of attached files.
118 .PP
119 The other method of composing MIME messages is to use
120 .B mhbuild
121 directives. This allows exact control over the contents and format of
122 the MIME message, but has a more complicated syntax.
123 .IR mhbuild (1)
124 contains details on the directive syntax and examples of directives
125 for different media types. It is important to note that when using
126 .B mhbuild
127 directives the user must run
128 .B mhbuild
129 outside of
130 .B send
131 to have it process directives; when being run by
132 .BR send ,
133 .B mhbuild
134 is configured to not process directives so normal user text is not mistaken
135 for a directive. When using directives a user typically uses the
136 .B mime
137 command at the \*(lqWhat now?\*(rq prompt to process them.
138 .PP
139 When replying to messages using
140 .IR repl (1)
141 the traditional MH method of including the original text in the reply does
142 not interoperate with MIME messages. The
143 .B \-convertargs
144 switch to
145 .IR repl (1)
146 provides one solution. Another solution: the contrib directory
147 .RI ( %docdir%/contrib )
148 contains a Perl program called
149 .B replyfilter
150 which will decode text parts and present them in an appropriate manner
151 to be included in a message reply. See the comments at the top of
152 .B replyfilter
153 for instructions on how to configure
154 .B nmh
155 to work with it.
156 .SS
157 Message Rewrite
158 The
159 .IR mhfixmsg (1)
160 command can apply various transformations to MIME messages, including
161 decoding of text parts, converting the character set of text parts,
162 and insertion of text/plain parts to correspond to text parts of other
163 subtypes.
164 .B mhfixmsg
165 can also repair defects in MIME messages, such as mismatched top-level
166 boundary indicators and invalid Content-Transfer-Encoding values.
167 .SH "SEE ALSO"
168 .IR comp (1),
169 .IR iconv (3),
170 .IR mh\-format (5),
171 .IR mhbuild (1),
172 .IR mhfixmsg (1),
173 .IR mhparam (1),
174 .IR nmh (7),
175 .IR repl (1),
176 .IR whatnow (1),
177 .br
178 .IR %docdir%/contrib/replyfilter ,
179 .br
180 .I %docdir%/contrib/replaliases
181 .SH BUGS
182 MIME support should be more integrated into all of the
183 .B nmh
184 tools than it currently is.