1MH-MIME(7)             Miscellaneous Information Manual             MH-MIME(7)
2
3
4

NAME

6       mh-mime - overview of nmh MIME message composition and display
7

DESCRIPTION

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 mhparam(1) for how to  de‐
22       termine whether your nmh installation includes iconv(3) support.
23
24       Depending  on the source and target character set, it may not be possi‐
25       ble to convert all characters to the local character set.  In this case
26       a substitution character will be used for the characters that cannot be
27       converted.
28
29   Message Display
30       The default format used by scan(1) will automatically  decode  MIME-en‐
31       coded headers.  If you have a custom scan format, see the examples pro‐
32       vided with the nmh distribution (found in the “/etc/nmh” directory) and
33       mh-format(5)  for  details  on  how  to make sure your MIME headers are
34       properly decoded.
35
36       By default, if show detects that it is reading a MIME message  it  will
37       invoke  mhshow(1).   The  default behavior of mhshow is to only display
38       text parts that are not marked as attachments.  See mhshow(1)  for  de‐
39       tails on how to control what mhshow will display.
40
41   Message Interrogation and Storage
42       The  mhlist(1)  command  will  display a listing of the MIME parts con‐
43       tained within a message.  That information can be used  in  conjunction
44       with the mhstore command to save individual parts or content types of a
45       message.  See mhlist(1) and mhstore(1) for more details  on  how  these
46       commands work.
47
48   Message Composition and Reply
49       All  messages  sent  by  send(1) will automatically be processed by mh‐
50       build(1) before being passed to post(1) for  message  submission.   mh‐
51       build will use the locale settings to mark text content with the appro‐
52       priate character set and apply any necessary encoding.  If you wish  to
53       include  text in your message using a character set that does not match
54       your locale, you will need to specify the character set  using  an  mh‐
55       build directive; see mhbuild(1) for more information.
56
57       For  attaching files or composing other non-text content, there are two
58       options: the attach system and mhbuild directives.
59
60       The attach system is best suited for content where one  or  more  files
61       are  being attached to a message.  You can use the attach system by ei‐
62       ther using the attach command at the “What now?” prompt, or by  insert‐
63       ing an “Attach:” header in the message draft containing the name of the
64       file you wish to attach to the message (note that all the  attach  com‐
65       mand  does is place an “Attach:” header in the message draft).  mhbuild
66       will then automatically include the specified file(s) in  the  outgoing
67       message.   See send(1) for details on how mhbuild determines the proper
68       content type of attached files.
69
70       The other method of composing MIME messages is to  use  mhbuild  direc‐
71       tives.   This  allows exact control over the contents and format of the
72       MIME message, but has a more complicated syntax.   mhbuild(1)  contains
73       details  on the directive syntax and examples of directives for differ‐
74       ent media types.  It is important to note that when using  mhbuild  di‐
75       rectives  the  user must run mhbuild outside of send to have it process
76       directives; when being run  by  send,  mhbuild  is  configured  to  not
77       process directives so normal user text is not mistaken for a directive.
78       When using directives a user typically uses the  mime  command  at  the
79       “What now?” prompt to process them.
80
81       When  replying  to  messages using repl(1) the traditional MH method of
82       including the original text in the reply  does  not  interoperate  with
83       MIME  messages.   The -convertargs switch to repl(1) provides one solu‐
84       tion.      Another      solution:       the      contrib      directory
85       (/usr/share/doc/nmh/contrib) contains a Perl program called replyfilter
86       which will decode text parts and present them in an appropriate  manner
87       to  be included in a message reply.  See the comments at the top of re‐
88       plyfilter for instructions on how to configure nmh to work with it.
89
90   Message Rewrite
91       The mhfixmsg(1) command can apply various transformations to MIME  mes‐
92       sages,  including  decoding of text parts, converting the character set
93       of text parts, and insertion of text/plain parts to correspond to  text
94       parts of other subtypes.  mhfixmsg can also repair defects in MIME mes‐
95       sages, such as mismatched top-level  boundary  indicators  and  invalid
96       Content-Transfer-Encoding values.
97

SEE ALSO

99       comp(1),  iconv(3),  mh-format(5), mhbuild(1), mhfixmsg(1), mhparam(1),
100       nmh(7), repl(1), whatnow(1),
101       /usr/share/doc/nmh/contrib/replyfilter,
102       /usr/share/doc/nmh/contrib/replaliases
103

BUGS

105       MIME support should be more integrated into all of the nmh  tools  than
106       it currently is.
107
108
109
110nmh-1.8                           2014-12-15                        MH-MIME(7)
Impressum