source: trunk/third/nmh/man/mhshow.man @ 12455

Revision 12455, 15.3 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
RevLine 
[12454]1.\"
2.\" %nmhwarning%
3.\" $Id: mhshow.man,v 1.1.1.1 1999-02-07 18:14:21 danw Exp $
4.\"
5.\" include the -mh macro file
6.so %etcdir%/tmac.h
7.\"
8.TH MHSHOW %manext1% MH.6.8 [%nmhversion%]
9.SH NAME
10mhshow \- display MIME messages
11.SH SYNOPSIS
12.in +.5i
13.ti -.5i
14mhshow \%[+folder] \%[msgs] \%[\-file file]
15.br
16\%[\-part number]... \%[\-type content]...
17.br
18\%[\-serialonly] \%[\-noserialonly]
19\%[\-pause] \%[\-nopause]
20.br
21\%[\-check] \%[\-nocheck]
22\%[\-form formfile]
23.br
24\%[\-rcache policy] \%[\-wcache policy]
25.br
26\%[\-verbose] \%[\-noverbose]
27\%[\-version] \%[\-help]
28.in -.5i
29
30.SH DESCRIPTION
31The \fImhshow\fR command display contents of a MIME (multi-media)
32message or collection of messages.
33
34\fImhshow\fR manipulates multi-media messages as specified in
35RFC\-2045 thru RFC\-2049.  Currently \fImhshow\fR only supports
36encodings in message bodies, and does not support the encoding of
37message headers as specified in RFC\-2047.
38
39By default \fImhshow\fR will display all parts of a multipart
40message.  By using the `\-part' and `\-type' switches, you may
41limit the scope of \fImhshow\fR to particular subparts (of a
42multipart content) and/or particular content types.
43
44The option `\-file\ file' directs \fImhshow\fR to use the specified file as
45the source message, rather than a message from a folder.  If you specify
46this file as \*(lq-\*(rq, then \fImhshow\fR will accept the source message
47on the standard input.  Note that the file, or input from standard input
48should be a validly formatted message, just like any other \fInmh\fR
49message.  It should \fBNOT\fR be in mail drop format (to convert a file in
50mail drop format to a folder of \fInmh\fR messages, see \fIinc\fR\0(1)).
51
52A part specification consists of a series of numbers separated by dots.
53For example, in a multipart content containing three parts, these
54would be named as 1, 2, and 3, respectively.  If part 2 was also a
55multipart content containing two parts, these would be named as 2.1 and
562.2, respectively.  Note that the `\-part' switch is effective for only
57messages containing a multipart content.  If a message has some other
58kind of content, or if the part is itself another multipart content, the
59`\-part' switch will not prevent the content from being acted upon.
60
61A content specification consists of a content type and a subtype.
62The initial list of \*(lqstandard\*(rq content types and subtypes can
63be found in RFC\-2046.
64.ne 18
65A list of commonly used contents is briefly reproduced here:
66.sp
67.nf
68.in +.5i
69.ta \w'application  'u
70Type    Subtypes
71----    --------
72text    plain, enriched
73multipart       mixed, alternative, digest, parallel
74message rfc822, partial, external-body
75application     octet-stream, postscript
76image   jpeg, gif, png
77audio   basic
78video   mpeg
79.re
80.in -.5i
81.fi
82.sp
83A legal MIME message must contain a subtype specification.
84.PP
85To specify a content, regardless of its subtype, just use the
86name of the content, e.g., \*(lqaudio\*(rq.  To specify a specific
87subtype, separate the two with a slash, e.g., \*(lqaudio/basic\*(rq.
88Note that regardless of the values given to the `\-type' switch, a
89multipart content (of any subtype listed above) is always acted upon.
90Further note that if the `\-type' switch is used, and it is desirable to
91act on a message/external-body content, then the `\-type' switch must
92be used twice: once for message/external-body and once for the content
93externally referenced.
94
95.Uh "Unseen Sequence"
96
97If the profile entry \*(lqUnseen\-Sequence\*(rq is present and
98non\-empty, then \fImhshow\fR will remove each of the messages shown
99from each sequence named by the profile entry.
100
101.Uh "Checking the Contents"
102The `\-check' switch tells \fImhshow\fR to check each content for an
103integrity checksum.  If a content has such a checksum (specified as a
104Content-MD5 header field), then \fImhshow\fR will attempt to verify the
105integrity of the content.
106
107.Uh "Showing the Contents"
108The headers of each message are displayed with the \fImhlproc\fR
109(usually \fImhl\fR), using the standard format file \fImhl.headers\fR.
110You may specify an alternate format file with the `\-form formfile'
111switch.  If the format file \fImhl.null\fR is specified, then the display
112of the message headers is suppressed.
113
114The method used to display the different contents in the messages bodies
115will be determined by a \*(lqdisplay string\*(rq.  To find the display
116string, \fImhshow\fR will first search your profile for an entry of the
117form:
118.sp
119.in +.5i
120mhshow-show-<type>/<subtype>
121.in -.5i
122.sp
123to determine the display string.  If this isn't found, \fImhshow\fR
124will search for an entry of the form:
125.sp
126.in +.5i
127mhshow-show-<type>
128.in -.5i
129.sp
130to determine the display string.
131
132If a display string is found, any escapes (given below) will be expanded.
133The result will be executed under \fB/bin/sh\fR, with the standard input
134set to the content.
135.ne 16
136The display string may contain the following escapes:
137.sp
138.nf
139.in +.5i
140.ta \w'%F  'u
141%a      Insert parameters from Content-Type field
142%e      exclusive execution
143%f      Insert filename containing content
144%F      %e, %f, and stdin is terminal not content
145%l      display listing prior to displaying content
146%p      %l, and ask for confirmation
147%s      Insert content subtype
148%d      Insert content description
149%%      Insert the character %
150.re
151.in -.5i
152.fi
153.sp
154.ne 10
155For those display strings containing the e- or F-escape, \fImhshow\fR will
156execute at most one of these at any given time.  Although the F-escape
157expands to be the filename containing the content, the e-escape has no
158expansion as far as the shell is concerned.
159
160When the p-escape prompts for confirmation, typing INTR (usually
161control-C) will tell \fImhshow\fR not to display that content.
162The p-escape can be disabled by specifying the switch `\-nopause'.
163Further, when \fImhshow\fR is display a content, typing QUIT (usually
164control-\\) will tell \fImhshow\fR to wrap things up immediately.
165
166Note that if the content being displayed is multipart, but not one of
167the subtypes listed above, then the f- and F-escapes expand to multiple
168filenames, one for each subordinate content.  Further, stdin is not
169redirected from the terminal to the content.
170
171If a display string is not found, \fImhshow\fR has several default values:
172.sp
173.nf
174.in +.5i
175mhshow-show-text/plain: %pmoreproc '%F'
176mhshow-show-message/rfc822: %pshow -file '%F'
177.in -.5i
178.fi
179.sp
180If a subtype of type text doesn't have a profile entry, it will be
181treated as text/plain.
182
183\fImhshow\fR has default methods for handling multipart messages of subtype
184mixed, alternative, parallel, and digest.  Any unknown subtype of type
185multipart (without a profile entry), will be treated as multipart/mixed.
186
187If none of these apply, then \fImhshow\fR will check to see if the message
188has an application/octet-stream content with parameter \*(lqtype=tar\*(rq.
189If so, \fImhshow\fR will use an appropriate command.  If not, \fImhshow\fR
190will complain.
191
192.ne 10
193Example entries might be:
194.sp
195.nf
196.in +.5i
197mhshow-show-audio/basic: raw2audio 2>/dev/null | play
198mhshow-show-image: xv '%f'
199mhshow-show-application/PostScript: lpr -Pps
200.in -.5i
201.fi
202.sp
203Note that when using the f- or F-escape, it's a good idea to use
204single-quotes around the escape.  This prevents misinterpretation by
205the shell of any funny characters that might be present in the filename.
206
207Finally, \fImhshow\fR will process each message serially\0--\0it won't start
208showing the next message until all the commands executed to display the
209current message have terminated.  In the case of a multipart content
210(of any subtype listed above), the content contains advice indicating if
211the parts should be displayed serially or in parallel.  Because this may
212cause confusion, particularly on uni-window displays, the `\-serialonly'
213switch can be given to tell \fImhshow\fR to never display parts in parallel.
214
215.Uh "Showing Alternate Character Sets"
216Because a content of type text might be in a non-ASCII character
217set, when \fImhshow\fR encounters a \*(lqcharset\*(rq parameter for
218this content, it checks if your terminal can display this character
219set natively.  \fIMhn\fR checks this by examining the the environment
220variable MM_CHARSET.  If the value of this environment variable is equal
221to the value of the charset parameter, then \fImhshow\fR assumes it can
222display this content without any additional setup.  If this environment
223variable is not set, \fImhshow\fR will assume a value of \*(lqUS-ASCII\*(rq.
224If the character set cannot be displayed natively, then \fImhshow\fR will
225look for an entry of the form:
226.sp
227.in +.5i
228mhshow-charset-<charset>
229.in -.5i
230.sp
231which should contain a command creating an environment to render
232the character set.  This command string should containing a single
233\*(lq%s\*(rq, which will be filled-in with the command to display the
234content.
235
236Example entries might be:
237.sp
238.in +.5i
239mhshow-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s
240.in -.5i
241or
242.in +.5i
243mhshow-charset-iso-8859-1: '%s'
244.in -.5i
245.sp
246The first example tells \fImhshow\fR to start \fIxterm\fR and load the
247appropriate character set for that message content.  The second example
248tells \fImhshow\fR that your pager (or other program handling that content
249type) can handle that character set, and that no special processing is
250needed beforehand.
251.sp
252Note that many pagers strip off the high-order bit or have problems
253displaying text with the high-order bit set.  However, the pager
254\fIless\fR has support for single-octet character sets.  The source
255to \fIless\fR is available on many ftp sites carrying free software.
256In order to view messages sent in the ISO-8859-1 character set using
257\fIless\fR,
258.ne 9
259put these lines in your \&.login file:
260.sp
261.nf
262.in +.5i
263setenv LESSCHARSET latin1
264setenv LESS "-f"
265.in -.5i
266.fi
267.sp
268The first line tells \fIless\fR to use the ISO-8859-1 definition for
269determining whether a character is \*(lqnormal\*(rq, \*(lqcontrol\*(lq,
270or \*(lqbinary\*(rq.  The second line tells \fIless\fR not to warn you
271if it encounters a file that has non-ASCII characters.  Then, simply
272set the \fBmoreproc\fR profile entry to \fIless\fR, and it will get
273called automatically.  (To handle other single-octet character sets,
274look at the \fIless\fR\0(1) manual entry for information about the
275\fBLESSCHARDEF\fR environment variable.)
276
277.Uh "Messages of Type message/partial"
278\fImhshow\fR cannot directly display messages of type partial.
279You must reassemble them first into a normal message using
280\fImhstore\fR.  Check the man page for \fImhstore\fR for details.
281
282.Uh "External Access"
283For contents of type message/external-body,
284.ne 12
285\fImhshow\fR supports these access-types:
286.sp
287.nf
288.in +.5i
289afs
290anon-ftp
291ftp
292local-file
293mail-server
294.in -.5i
295.fi
296.sp
297For the \*(lqanon-ftp\*(rq and \*(lqftp\*(rq access types,
298\fImhshow\fR will look for the \fBnmh-access-ftp\fR
299profile entry,
300.ne 6
301e.g.,
302.sp
303.in +.5i
304nmh-access-ftp: myftp.sh
305.in -.5i
306.sp
307to determine the pathname of a program to perform the FTP retrieval.
308.ne 14
309This program is invoked with these arguments:
310.sp
311.nf
312.in +.5i
313domain name of FTP-site
314username
315password
316remote directory
317remote filename
318local filename
319\*(lqascii\*(rq or \*(lqbinary\*(rq
320.in -.5i
321.fi
322.sp
323The program should terminate with an exit status of zero if the
324retrieval is successful, and a non-zero exit status otherwise.
325
326If this entry is not provided, then \fImhshow\fR will use a simple
327built-in FTP client to perform the retrieval.
328
329.Uh "The Content Cache"
330When \fImhshow\fR encounters an external content containing a
331\*(lqContent-ID:\*(rq field, and if the content allows caching, then
332depending on the caching behavior of \fImhshow\fR, the content might be
333read from or written to a cache.
334
335The caching behavior of \fImhshow\fR is controlled with the `\-rcache'
336and `\-wcache' switches, which define the policy for reading from,
337and writing to, the cache, respectively.  One of four policies may be
338specified: \*(lqpublic\*(rq, indicating that \fImhshow\fR should make use
339of a publically-accessible content cache; \*(lqprivate\*(rq, indicating
340that \fImhshow\fR should make use of the user's private content cache;
341\*(lqnever\*(rq, indicating that \fImhshow\fR should never make use of
342caching; and, \*(lqask\*(rq, indicating that \fImhshow\fR should ask
343the user.
344
345There are two directories where contents may be cached: the profile entry
346\fBnmh-cache\fR names a directory containing world-readable contents, and,
347the profile entry \fBnmh-private-cache\fR names a directory containing
348private contents.  The former should be an absolute (rooted) directory
349name.
350.ne 6
351For example,
352.sp
353.in +.5i
354nmh-cache: /tmp
355.in -.5i
356.sp
357might be used if you didn't care that the cache got wiped after each
358reboot of the system.  The latter is interpreted relative to the user's
359nmh directory, if not rooted,
360.ne 6
361e.g.,
362.sp
363.in +.5i
364nmh-private-cache: .cache
365.in -.5i
366.sp
367(which is the default value).
368
369.Uh "User Environment"
370Because the display environment in which \fImhshow\fR operates may vary for
371different machines, \fImhshow\fR will look for the environment variable
372\fB$MHSHOW\fR.  If present, this specifies the name of an additional
373user profile which should be read.  Hence, when a user logs in on a
374particular display device, this environment variable should be set to
375refer to a file containing definitions useful for the given display device.
376Normally, only entries that deal with the methods to display different
377content type and subtypes
378.sp
379.in +.5i
380mhshow-show-<type>/<subtype>
381.br
382mhshow-show-<type>
383.in -.5i
384.sp
385need be present in this additional profile.
386Finally,
387\fImhshow\fR will attempt to consult one other additional user profile,
388.ne 6
389e.g.,
390.sp
391.in +.5i
392%etcdir%/mhn.defaults
393.in -.5i
394.sp
395which is created automatically during nmh installation.
396.Fi
397^$HOME/\&.mh\(ruprofile~^The user profile
398^$MHSHOW~^Additional profile entries
399^%etcdir%/mhn.defaults~^System default MIME profile entries
400^%etcdir%/mhl.headers~^The headers template
401.Pr
402^Path:~^To determine the user's nmh directory
403.Ps
404^Current\-Folder:~^To find the default current folder
405.Ps
406^Unseen\-Sequence:~^To name sequences denoting unseen messages
407.Ps
408^mhlproc:~^Default program to display message headers
409.Ps
410^nmh-access-ftp:~^Program to retrieve contents via FTP
411.Ps
412^nmh-cache~^Public directory to store cached external contents
413.Ps
414^nmh-private-cache~^Personal directory to store cached external contents
415.Ps
416^mhshow-charset-<charset>~^Template for environment to render character sets
417.Ps
418^mhshow-show-<type>*~^Template for displaying contents
419.Ps
420^moreproc:~^Default program to display text/plain content
421.Sa
422mhbuild(1), mhl(1), mhlist(1), mhstore(1), sendfiles(1)
423.br
424RFC\-934:
425.br
426   \fIProposed Standard for Message Encapsulation\fR,
427.br
428RFC\-2045:
429.br
430   \fIMultipurpose Internet Mail Extensions (MIME) Part One:
431.br
432   Format of Internet Message Bodies\fR,
433.br
434RFC\-2046:
435.br
436   \fIMultipurpose Internet Mail Extensions (MIME) Part Two:
437.br
438   Media Types\fR,
439.br
440RFC\-2047:
441.br
442   \fIMultipurpose Internet Mail Extensions (MIME) Part Three:
443.br
444   Message Header Extensions for Non-ASCII Text\fR,
445.br
446RFC\-2048:
447.br
448   \fIMultipurpose Internet Mail Extensions (MIME) Part Four:
449.br
450   Registration Procedures\fR,
451.br
452RFC\-2049:
453.br
454   \fIMultipurpose Internet Mail Extensions (MIME) Part Five:
455.br
456   Conformance Criteria and Examples\fR.
457.De
458`+folder' defaults to the current folder
459.Ds
460`msgs' defaults to cur
461.Ds
462`\-nocheck'
463.Ds
464`\-form mhl.headers'
465.Ds
466`\-pause'
467.Ds
468`\-rcache ask'
469.Ds
470`\-realsize'
471.Ds
472`\-noserialonly'
473.Ds
474`\-noverbose'
475.Ds
476`\-wcache ask'
477.Co
478If a folder is given, it will become the current folder.  The last
479message selected will become the current message.
480.En
Note: See TracBrowser for help on using the repository browser.