1 | .\" |
---|
2 | .\" %nmhwarning% |
---|
3 | .\" $Id: mhn.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 MHN %manext1% MH.6.8 [%nmhversion%] |
---|
9 | .SH NAME |
---|
10 | mhn \- display/list/store/cache MIME messages |
---|
11 | .SH SYNOPSIS |
---|
12 | .in +.5i |
---|
13 | .ti -.5i |
---|
14 | mhn \%[+folder] \%[msgs] \%[\-file file] |
---|
15 | .br |
---|
16 | \%[\-part number]... \%[\-type content]... |
---|
17 | .br |
---|
18 | \%[\-show] \%[\-noshow] |
---|
19 | \%[\-list] \%[-nolist] |
---|
20 | .br |
---|
21 | \%[\-store] \%[\-nostore] |
---|
22 | \%[\-cache] \%[\-nocache] |
---|
23 | .br |
---|
24 | \%[\-headers] \%[\-noheaders] |
---|
25 | \%[\-realsize] \%[\-norealsize] |
---|
26 | .br |
---|
27 | \%[\-serialonly] \%[\-noserialonly] |
---|
28 | \%[\-form formfile] |
---|
29 | .br |
---|
30 | \%[\-pause] \%[\-nopause] |
---|
31 | \%[\-auto] \%[\-noauto] |
---|
32 | .br |
---|
33 | \%[\-rcache policy] \%[\-wcache policy] |
---|
34 | \%[\-check] \%[\-nocheck] |
---|
35 | .br |
---|
36 | \%[\-verbose] \%[\-noverbose] |
---|
37 | \%[\-version] |
---|
38 | \%[\-help] |
---|
39 | |
---|
40 | .ti .5i |
---|
41 | mhn \-build\ file |
---|
42 | .br |
---|
43 | \%[\-ebcdicsafe] \%[\-noebcdicsafe] |
---|
44 | .br |
---|
45 | \%[\-rfc934mode] \%[\-norfc934mode] |
---|
46 | .in -.5i |
---|
47 | |
---|
48 | .SH DESCRIPTION |
---|
49 | MHN SHOULD BE CONSIDERED DEPRECATED. IT IS RETAINED FOR THE PURPOSE |
---|
50 | OF BACKWARD COMPATIBILITY, BUT EVERYONE SHOULD MIGRATE TO USING THE |
---|
51 | COMMANDS MHSHOW, MHSTORE, AND MHLIST. CHECK THE INDIVIDUAL MAN PAGES |
---|
52 | FOR DETAILS. |
---|
53 | |
---|
54 | The \fImhn\fR command allows you to display, list, store, or cache the |
---|
55 | contents of a MIME (multi-media) messages. |
---|
56 | |
---|
57 | \fImhn\fR manipulates multi-media messages as specified in RFC\-2045 |
---|
58 | thru RFC\-2049. Currently \fImhn\fR only supports encodings in message |
---|
59 | bodies, and does not support the encoding of message headers as specified |
---|
60 | in RFC\-2047. |
---|
61 | |
---|
62 | The switches `\-list', `\-show', `\-store', and `-cache' direct |
---|
63 | the operation of \fImhn\fR. Only one of these switches may be used |
---|
64 | at a time. These switches are used to operate on the content of |
---|
65 | each of the named messages. By using the `\-part' and `\-type' |
---|
66 | switches, you may limit the scope of the given operation to particular |
---|
67 | subparts (of a multipart content) and/or particular content types. |
---|
68 | |
---|
69 | The switch `\-build' is used to construct a MIME message. It is |
---|
70 | for backward compatibility and instructs \fImhn\fR to execute the |
---|
71 | \fImhbuild\fR command. It is preferred that you use the \fImhbuild\fR |
---|
72 | command directly. See the \fImhbuild\fR(1) man page for details. |
---|
73 | |
---|
74 | The option `\-file\ file' directs \fImhn\fR to use the specified file as |
---|
75 | the source message, rather than a message from a folder. If you specify |
---|
76 | this file as \*(lq-\*(rq, then \fImhn\fR will accept the source message |
---|
77 | on the standard input. Note that the file, or input from standard input |
---|
78 | should be a validly formatted message, just like any other \fInmh\fR |
---|
79 | message. It should \fBNOT\fR be in mail drop format (to convert a file in |
---|
80 | mail drop format to a folder of \fInmh\fR messages, see \fIinc\fR\0(1)). |
---|
81 | |
---|
82 | A part specification consists of a series of numbers separated by dots. |
---|
83 | For example, in a multipart content containing three parts, these |
---|
84 | would be named as 1, 2, and 3, respectively. If part 2 was also a |
---|
85 | multipart content containing two parts, these would be named as 2.1 and |
---|
86 | 2.2, respectively. Note that the `\-part' switch is effective for only |
---|
87 | messages containing a multipart content. If a message has some other |
---|
88 | kind of content, or if the part is itself another multipart content, the |
---|
89 | `\-part' switch will not prevent the content from being acted upon. |
---|
90 | |
---|
91 | A content specification consists of a content type and a subtype. |
---|
92 | The initial list of \*(lqstandard\*(rq content types and subtypes can |
---|
93 | be found in RFC\-2046. |
---|
94 | .ne 18 |
---|
95 | A list of commonly used contents is briefly reproduced here: |
---|
96 | .sp |
---|
97 | .nf |
---|
98 | .in +.5i |
---|
99 | .ta \w'application 'u |
---|
100 | Type Subtypes |
---|
101 | ---- -------- |
---|
102 | text plain, enriched |
---|
103 | multipart mixed, alternative, digest, parallel |
---|
104 | message rfc822, partial, external-body |
---|
105 | application octet-stream, postscript |
---|
106 | image jpeg, gif, png |
---|
107 | audio basic |
---|
108 | video mpeg |
---|
109 | .re |
---|
110 | .in -.5i |
---|
111 | .fi |
---|
112 | .sp |
---|
113 | A legal MIME message must contain a subtype specification. |
---|
114 | .PP |
---|
115 | To specify a content, regardless of its subtype, just use the |
---|
116 | name of the content, e.g., \*(lqaudio\*(rq. To specify a specific |
---|
117 | subtype, separate the two with a slash, e.g., \*(lqaudio/basic\*(rq. |
---|
118 | Note that regardless of the values given to the `\-type' switch, a |
---|
119 | multipart content (of any subtype listed above) is always acted upon. |
---|
120 | Further note that if the `\-type' switch is used, and it is desirable to |
---|
121 | act on a message/external-body content, then the `\-type' switch must |
---|
122 | be used twice: once for message/external-body and once for the content |
---|
123 | externally referenced. |
---|
124 | |
---|
125 | .Uh "Checking the Contents" |
---|
126 | The `\-check' switch tells \fImhn\fR to check each content for an |
---|
127 | integrity checksum. If a content has such a checksum (specified as a |
---|
128 | Content-MD5 header field), then \fImhn\fR will attempt to verify the |
---|
129 | integrity of the content. |
---|
130 | |
---|
131 | .Uh "Listing the Contents" |
---|
132 | The `\-list' switch tells \fImhn\fR to list the table of contents |
---|
133 | associated with the named messages. |
---|
134 | |
---|
135 | The `\-headers' switch indicates that |
---|
136 | a one-line banner should be displayed above the listing. The `\-realsize' |
---|
137 | switch tells \fImhn\fR to evaluate the \*(lqnative\*(rq (decoded) format |
---|
138 | of each content prior to listing. This provides an accurate count at |
---|
139 | the expense of a small delay. If the `\-verbose' switch is present, then |
---|
140 | the listing will show any \*(lqextra\*(rq information that is present in |
---|
141 | the message, such as comments in the Content-Type header. |
---|
142 | |
---|
143 | .Uh "Showing the Contents" |
---|
144 | The `\-show' switch tells \fImhn\fR to display the contents of the named |
---|
145 | messages. |
---|
146 | |
---|
147 | The headers of each message are displayed with the \fImhlproc\fR |
---|
148 | (usually \fImhl\fR), using the standard format file \fImhl.headers\fR. |
---|
149 | You may specify an alternate format file with the `\-form formfile' |
---|
150 | switch. If the format file \fImhl.null\fR is specified, then the display |
---|
151 | of the message headers is suppressed. |
---|
152 | |
---|
153 | The method used to display the different contents in the messages bodies |
---|
154 | will be determined by a \*(lqdisplay string\*(rq. To find the display |
---|
155 | string, \fImhn\fR will first search your profile for an entry of the form: |
---|
156 | .sp |
---|
157 | .in +.5i |
---|
158 | mhn-show-<type>/<subtype> |
---|
159 | .in -.5i |
---|
160 | .sp |
---|
161 | to determine the display string. If this isn't found, \fImhn\fR |
---|
162 | will search for an entry of the form: |
---|
163 | .sp |
---|
164 | .in +.5i |
---|
165 | mhn-show-<type> |
---|
166 | .in -.5i |
---|
167 | .sp |
---|
168 | to determine the display string. |
---|
169 | |
---|
170 | If a display string is found, any escapes (given below) will be expanded. |
---|
171 | The result will be executed under \fB/bin/sh\fR, with the standard input |
---|
172 | set to the content. |
---|
173 | .ne 16 |
---|
174 | The display string may contain the following escapes: |
---|
175 | .sp |
---|
176 | .nf |
---|
177 | .in +.5i |
---|
178 | .ta \w'%F 'u |
---|
179 | %a Insert parameters from Content-Type field |
---|
180 | %e exclusive execution |
---|
181 | %f Insert filename containing content |
---|
182 | %F %e, %f, and stdin is terminal not content |
---|
183 | %l display listing prior to displaying content |
---|
184 | %p %l, and ask for confirmation |
---|
185 | %s Insert content subtype |
---|
186 | %d Insert content description |
---|
187 | %% Insert the character % |
---|
188 | .re |
---|
189 | .in -.5i |
---|
190 | .fi |
---|
191 | .sp |
---|
192 | .ne 10 |
---|
193 | For those display strings containing the e- or F-escape, \fImhn\fR will |
---|
194 | execute at most one of these at any given time. Although the F-escape |
---|
195 | expands to be the filename containing the content, the e-escape has no |
---|
196 | expansion as far as the shell is concerned. |
---|
197 | |
---|
198 | When the p-escape prompts for confirmation, typing INTR (usually |
---|
199 | control-C) will tell \fImhn\fR not to display that content. The p-escape |
---|
200 | can be disabled by specifying the switch `\-nopause'. Further, when |
---|
201 | \fImhn\fR is display a content, typing QUIT (usually control-\\) will |
---|
202 | tell \fImhn\fR to wrap things up immediately. |
---|
203 | |
---|
204 | Note that if the content being displayed is multipart, but not one of |
---|
205 | the subtypes listed above, then the f- and F-escapes expand to multiple |
---|
206 | filenames, one for each subordinate content. Further, stdin is not |
---|
207 | redirected from the terminal to the content. |
---|
208 | |
---|
209 | If a display string is not found, \fImhn\fR has several default values: |
---|
210 | .sp |
---|
211 | .nf |
---|
212 | .in +.5i |
---|
213 | mhn-show-text/plain: %pmoreproc '%F' |
---|
214 | mhn-show-message/rfc822: %pshow -file '%F' |
---|
215 | .in -.5i |
---|
216 | .fi |
---|
217 | .sp |
---|
218 | If a subtype of type text doesn't have a profile entry, it will be |
---|
219 | treated as text/plain. |
---|
220 | |
---|
221 | \fImhn\fR has default methods for handling multipart messages of subtype |
---|
222 | mixed, alternative, parallel, and digest. Any unknown subtype of type |
---|
223 | multipart (without a profile entry), will be treated as multipart/mixed. |
---|
224 | |
---|
225 | If none of these apply, then \fImhn\fR will check to see if the message |
---|
226 | has an application/octet-stream content with parameter \*(lqtype=tar\*(rq. |
---|
227 | If so, \fImhn\fR will use an appropriate command. If not, \fImhn\fR |
---|
228 | will complain. |
---|
229 | |
---|
230 | .ne 10 |
---|
231 | Example entries might be: |
---|
232 | .sp |
---|
233 | .nf |
---|
234 | .in +.5i |
---|
235 | mhn-show-audio/basic: raw2audio 2>/dev/null | play |
---|
236 | mhn-show-image: xv '%f' |
---|
237 | mhn-show-application/PostScript: lpr -Pps |
---|
238 | .in -.5i |
---|
239 | .fi |
---|
240 | .sp |
---|
241 | Note that when using the f- or F-escape, it's a good idea to use |
---|
242 | single-quotes around the escape. This prevents misinterpretation by |
---|
243 | the shell of any funny characters that might be present in the filename. |
---|
244 | |
---|
245 | Finally, \fImhn\fR will process each message serially\0--\0it won't start |
---|
246 | showing the next message until all the commands executed to display the |
---|
247 | current message have terminated. In the case of a multipart content |
---|
248 | (of any subtype listed above), the content contains advice indicating if |
---|
249 | the parts should be displayed serially or in parallel. Because this may |
---|
250 | cause confusion, particularly on uni-window displays, the `\-serialonly' |
---|
251 | switch can be given to tell \fImhn\fR to never display parts in parallel. |
---|
252 | |
---|
253 | .Uh "Showing Alternate Character Sets" |
---|
254 | Because a content of type text might be in a non-ASCII character |
---|
255 | set, when \fImhn\fR encounters a \*(lqcharset\*(rq parameter for |
---|
256 | this content, it checks if your terminal can display this character |
---|
257 | set natively. \fIMhn\fR checks this by examining the the environment |
---|
258 | variable MM_CHARSET. If the value of this environment variable is equal |
---|
259 | to the value of the charset parameter, then \fImhn\fR assumes it can |
---|
260 | display this content without any additional setup. If this environment |
---|
261 | variable is not set, \fImhn\fR will assume a value of \*(lqUS-ASCII\*(rq. |
---|
262 | If the character set cannot be displayed natively, then \fImhn\fR will |
---|
263 | look for an entry of the form: |
---|
264 | .sp |
---|
265 | .in +.5i |
---|
266 | mhn-charset-<charset> |
---|
267 | .in -.5i |
---|
268 | .sp |
---|
269 | which should contain a command creating an environment to render |
---|
270 | the character set. This command string should containing a single |
---|
271 | \*(lq%s\*(rq, which will be filled-in with the command to display the |
---|
272 | content. |
---|
273 | |
---|
274 | Example entries might be: |
---|
275 | .sp |
---|
276 | .in +.5i |
---|
277 | mhn-charset-iso-8859-1: xterm -fn '-*-*-medium-r-normal-*-*-120-*-*-c-*-iso8859-*' -e %s |
---|
278 | .in -.5i |
---|
279 | or |
---|
280 | .in +.5i |
---|
281 | mhn-charset-iso-8859-1: '%s' |
---|
282 | .in -.5i |
---|
283 | .sp |
---|
284 | The first example tells \fImhn\fR to start \fIxterm\fR and load the |
---|
285 | appropriate character set for that message content. The second example |
---|
286 | tells \fImhn\fR that your pager (or other program handling that content |
---|
287 | type) can handle that character set, and that no special processing is |
---|
288 | needed beforehand. |
---|
289 | .sp |
---|
290 | Note that many pagers strip off the high-order bit or have problems |
---|
291 | displaying text with the high-order bit set. However, the pager |
---|
292 | \fIless\fR has support for single-octet character sets. The source |
---|
293 | to \fIless\fR is available on many ftp sites carrying free software. |
---|
294 | In order to view messages sent in the ISO-8859-1 character set using |
---|
295 | \fIless\fR, |
---|
296 | .ne 9 |
---|
297 | put these lines in your \&.login file: |
---|
298 | .sp |
---|
299 | .nf |
---|
300 | .in +.5i |
---|
301 | setenv LESSCHARSET latin1 |
---|
302 | setenv LESS "-f" |
---|
303 | .in -.5i |
---|
304 | .fi |
---|
305 | .sp |
---|
306 | The first line tells \fIless\fR to use the ISO-8859-1 definition for |
---|
307 | determining whether a character is \*(lqnormal\*(rq, \*(lqcontrol\*(lq, |
---|
308 | or \*(lqbinary\*(rq. The second line tells \fIless\fR not to warn you |
---|
309 | if it encounters a file that has non-ASCII characters. Then, simply |
---|
310 | set the \fBmoreproc\fR profile entry to \fIless\fR, and it will get |
---|
311 | called automatically. (To handle other single-octet character sets, |
---|
312 | look at the \fIless\fR\0(1) manual entry for information about the |
---|
313 | \fBLESSCHARDEF\fR environment variable.) |
---|
314 | |
---|
315 | .Uh "Storing the Contents" |
---|
316 | The `\-store' switch tells \fImhn\fR to store the contents of the |
---|
317 | named messages in \*(lqnative\*(rq (decoded) format. Two things must |
---|
318 | be determined: the directory to store the content, and the filenames. |
---|
319 | Files are written in the directory given by the \fBnmh-storage\fR |
---|
320 | profile entry, |
---|
321 | .ne 6 |
---|
322 | e.g., |
---|
323 | .sp |
---|
324 | .in +.5i |
---|
325 | nmh-storage: /tmp |
---|
326 | .in -.5i |
---|
327 | .sp |
---|
328 | If this entry isn't present, |
---|
329 | the current working directory is used. |
---|
330 | |
---|
331 | If the `\-auto' switch is given, then \fImhn\fR will check if the |
---|
332 | message contains information indicating the filename that should be |
---|
333 | used to store the content. This information should be specified as the |
---|
334 | attribute \*(lqname=filename\*(rq in the Content-Type header for the |
---|
335 | content you are storing. For security reasons, this filename will be |
---|
336 | ignored if it begins with the character '/', '.', '|', or '!', or if it |
---|
337 | contains the character '%'. For the sake of security, this switch is |
---|
338 | not the default, and it is recommended that you do NOT put the `\-auto' |
---|
339 | switch in your \&.mh\(ruprofile file. |
---|
340 | |
---|
341 | If the `\-auto' switch is not given (or is being ignored for |
---|
342 | security reasons) then \fImhn\fR will look in the user's profile for |
---|
343 | a \*(lqformatting string\*(rq to determine how the different contents |
---|
344 | should be stored. First, \fImhn\fR will look for an entry of the form: |
---|
345 | .sp |
---|
346 | .in +.5i |
---|
347 | mhn-store-<type>/<subtype> |
---|
348 | .in -.5i |
---|
349 | .sp |
---|
350 | to determine the formatting string. If this isn't found, \fImhn\fR will |
---|
351 | look for an entry of the form: |
---|
352 | .sp |
---|
353 | .in +.5i |
---|
354 | mhn-store-<type> |
---|
355 | .in -.5i |
---|
356 | .sp |
---|
357 | to determine the formatting string. |
---|
358 | |
---|
359 | If the formatting string starts with a \*(lq+\*(rq character, then |
---|
360 | content is stored in the named folder. A formatting string consisting |
---|
361 | solely of a \*(lq+\*(rq character is interpreted to be the current folder. |
---|
362 | |
---|
363 | If the formatting string consists solely of a \*(lq-\*(rq character, |
---|
364 | then the content is sent to the standard output. |
---|
365 | |
---|
366 | If the formatting string starts with a '|', then the display string will |
---|
367 | represent a command for \fImhn\fR to execute which should ultimately |
---|
368 | store the content. The content will be passed to the standard input of |
---|
369 | the command. Before the command is executed, \fImhn\fR will change to |
---|
370 | the appropriate directory, and any escapes (given below) in the display |
---|
371 | string will be expanded. |
---|
372 | |
---|
373 | Otherwise the formatting string will represent a pathname in which to |
---|
374 | store the content. If the formatting string starts with a '/', then the |
---|
375 | content will be stored in the full path given, else the file name will |
---|
376 | be relative to the value of \fBnmh-storage\fR or the current working |
---|
377 | directory. Any escapes (given below) will be expanded, except for the |
---|
378 | a-escape. |
---|
379 | |
---|
380 | A command or pathname formatting string may contain the following escapes. |
---|
381 | If the content isn't part of a multipart (of any subtype listed above) |
---|
382 | content, the p-escapes are ignored. |
---|
383 | .sp |
---|
384 | .nf |
---|
385 | .in +.5i |
---|
386 | .ta \w'%P 'u |
---|
387 | %a Parameters from Content-type (only valid with command) |
---|
388 | %m Insert message number |
---|
389 | %P Insert part number with leading dot |
---|
390 | %p Insert part number without leading dot |
---|
391 | %t Insert content type |
---|
392 | %s Insert content subtype |
---|
393 | %% Insert character % |
---|
394 | .re |
---|
395 | .in -.5i |
---|
396 | .fi |
---|
397 | .sp |
---|
398 | If no formatting string is found, \fImhn\fR will check to see if the |
---|
399 | content is application/octet-stream with parameter \*(lqtype=tar\*(rq. |
---|
400 | If so, \fImhn\fR will choose an appropriate filename. If the content |
---|
401 | is not application/octet-stream, then \fImhn\fR will check to see if the |
---|
402 | content is a message. If so, \fImhn\fR will use the value \*(lq+\*(rq. |
---|
403 | As a last resort, \fImhn\fR will use the value \*(lq%m%P.%s\*(rq. |
---|
404 | |
---|
405 | .ne 10 |
---|
406 | Example profile entries might be: |
---|
407 | .sp |
---|
408 | .nf |
---|
409 | .in +.5i |
---|
410 | mhn-store-text: %m%P.txt |
---|
411 | mhn-store-text: +inbox |
---|
412 | mhn-store-message/partial: + |
---|
413 | mhn-store-audio/basic: | raw2audio -e ulaw -s 8000 -c 1 > %m%P.au |
---|
414 | mhn-store-image/jpeg: %m%P.jpg |
---|
415 | mhn-store-application/PostScript: %m%P.ps |
---|
416 | .in -.5i |
---|
417 | .fi |
---|
418 | .sp |
---|
419 | .Uh "Reassembling Messages of Type message/partial" |
---|
420 | When asked to store a content containing a partial message, \fImhn\fR |
---|
421 | will try to locate all of the portions and combine them accordingly. |
---|
422 | The default is to store the combined parts as a new message in the |
---|
423 | current folder, although this can be changed using formatting |
---|
424 | strings as discussed above. Thus, if someone has sent you a message |
---|
425 | in several parts (such as the output from \fIsendfiles\fR), you can |
---|
426 | easily reassemble them all into a single message in the following |
---|
427 | fashion: |
---|
428 | .sp |
---|
429 | .nf |
---|
430 | .in +.5i |
---|
431 | % mhn -list 5-8 |
---|
432 | msg part type/subtype size description |
---|
433 | 5 message/partial 47K part 1 of 4 |
---|
434 | 6 message/partial 47K part 2 of 4 |
---|
435 | 7 message/partial 47K part 3 of 4 |
---|
436 | 8 message/partial 18K part 4 of 4 |
---|
437 | % mhn -store 5-8 |
---|
438 | reassembling partials 5,6,7,8 to folder inbox as message 9 |
---|
439 | % mhn -list -verbose 9 |
---|
440 | msg part type/subtype size description |
---|
441 | 9 application/octet-stream 118K |
---|
442 | (extract with uncompress | tar xvpf -) |
---|
443 | type=tar |
---|
444 | conversions=compress |
---|
445 | .in -.5i |
---|
446 | .fi |
---|
447 | .sp |
---|
448 | This will store exactly one message, containing the sum of the |
---|
449 | parts. It doesn't matter whether the partials are specified in |
---|
450 | order, since \fImhn\fR will sort the partials, so that they are |
---|
451 | combined in the correct order. But if \fImhn\fR can not locate |
---|
452 | every partial necessary to reassemble the message, it will not |
---|
453 | store anything. |
---|
454 | |
---|
455 | .Uh "External Access" |
---|
456 | For contents of type message/external-body, |
---|
457 | .ne 12 |
---|
458 | \fImhn\fR supports these access-types: |
---|
459 | .sp |
---|
460 | .nf |
---|
461 | .in +.5i |
---|
462 | afs |
---|
463 | anon-ftp |
---|
464 | ftp |
---|
465 | local-file |
---|
466 | mail-server |
---|
467 | .in -.5i |
---|
468 | .fi |
---|
469 | .sp |
---|
470 | For the \*(lqanon-ftp\*(rq and \*(lqftp\*(rq access types, |
---|
471 | \fImhn\fR will look for the \fBnmh-access-ftp\fR |
---|
472 | profile entry, |
---|
473 | .ne 6 |
---|
474 | e.g., |
---|
475 | .sp |
---|
476 | .in +.5i |
---|
477 | nmh-access-ftp: myftp.sh |
---|
478 | .in -.5i |
---|
479 | .sp |
---|
480 | to determine the pathname of a program to perform the FTP retrieval. |
---|
481 | .ne 14 |
---|
482 | This program is invoked with these arguments: |
---|
483 | .sp |
---|
484 | .nf |
---|
485 | .in +.5i |
---|
486 | domain name of FTP-site |
---|
487 | username |
---|
488 | password |
---|
489 | remote directory |
---|
490 | remote filename |
---|
491 | local filename |
---|
492 | \*(lqascii\*(rq or \*(lqbinary\*(rq |
---|
493 | .in -.5i |
---|
494 | .fi |
---|
495 | .sp |
---|
496 | The program should terminate with an exit status of zero if the |
---|
497 | retrieval is successful, and a non-zero exit status otherwise. |
---|
498 | |
---|
499 | If this entry is not provided, then \fImhn\fR will use a simple |
---|
500 | built-in FTP client to perform the retrieval. |
---|
501 | |
---|
502 | .Uh "The Content Cache" |
---|
503 | When \fImhn\fR encounters an external content containing a |
---|
504 | \*(lqContent-ID:\*(rq field, and if the content allows caching, then |
---|
505 | depending on the caching behavior of \fImhn\fR, the content might be |
---|
506 | read from or written to a cache. |
---|
507 | |
---|
508 | The caching behavior of \fImhn\fR is controlled with the `\-rcache' |
---|
509 | and `\-wcache' switches, which define the policy for reading from, |
---|
510 | and writing to, the cache, respectively. One of four policies may be |
---|
511 | specified: \*(lqpublic\*(rq, indicating that \fImhn\fR should make use |
---|
512 | of a publically-accessible content cache; \*(lqprivate\*(rq, indicating |
---|
513 | that \fImhn\fR should make use of the user's private content cache; |
---|
514 | \*(lqnever\*(rq, indicating that \fImhn\fR should never make use of |
---|
515 | caching; and, \*(lqask\*(rq, indicating that \fImhn\fR should ask |
---|
516 | the user. |
---|
517 | |
---|
518 | There are two directories where contents may be cached: the profile entry |
---|
519 | \fBnmh-cache\fR names a directory containing world-readable contents, and, |
---|
520 | the profile entry \fBnmh-private-cache\fR names a directory containing |
---|
521 | private contents. The former should be an absolute (rooted) directory |
---|
522 | name. |
---|
523 | .ne 6 |
---|
524 | For example, |
---|
525 | .sp |
---|
526 | .in +.5i |
---|
527 | nmh-cache: /tmp |
---|
528 | .in -.5i |
---|
529 | .sp |
---|
530 | might be used if you didn't care that the cache got wiped after each |
---|
531 | reboot of the system. The latter is interpreted relative to the user's |
---|
532 | nmh directory, if not rooted, |
---|
533 | .ne 6 |
---|
534 | e.g., |
---|
535 | .sp |
---|
536 | .in +.5i |
---|
537 | nmh-private-cache: .cache |
---|
538 | .in -.5i |
---|
539 | .sp |
---|
540 | (which is the default value). |
---|
541 | |
---|
542 | .Uh "Caching the Contents" |
---|
543 | When you encounter a content of type message/external-body with access |
---|
544 | type \*(lqmail-server\*(rq, \fImhn\fR will ask you if may send a message |
---|
545 | to a mail-server requesting the content, |
---|
546 | .ne 14 |
---|
547 | e.g., |
---|
548 | .sp |
---|
549 | .nf |
---|
550 | .in +.5i |
---|
551 | % show 1 |
---|
552 | Retrieve content by asking mail-server@... |
---|
553 | |
---|
554 | SEND file |
---|
555 | |
---|
556 | ? yes |
---|
557 | mhn: request sent |
---|
558 | .in -.5i |
---|
559 | .fi |
---|
560 | .sp |
---|
561 | Regardless of your decision, |
---|
562 | \fImhn\fR can't perform any other processing on the content. |
---|
563 | |
---|
564 | However, if \fImhn\fR is allowed to request the content, then when it |
---|
565 | arrives, there should be a top-level \*(lqContent-ID:\*(rq field which |
---|
566 | corresponds to the value in the original message/external-body content. |
---|
567 | You should now use the `-cache' switch to tell \fImhn\fR to enter the |
---|
568 | arriving content into the content cache, |
---|
569 | .ne 8 |
---|
570 | e.g., |
---|
571 | .sp |
---|
572 | .nf |
---|
573 | .in +.5i |
---|
574 | % mhn -cache 2 |
---|
575 | caching message 2 as file ... |
---|
576 | .in -.5i |
---|
577 | .fi |
---|
578 | .sp |
---|
579 | You can then re-process the original message/external-body content, and |
---|
580 | \*(lqthe right thing should happen\*(rq, |
---|
581 | .ne 8 |
---|
582 | e.g., |
---|
583 | .sp |
---|
584 | .nf |
---|
585 | .in +.5i |
---|
586 | % show 1 |
---|
587 | \0... |
---|
588 | .in -.5i |
---|
589 | .fi |
---|
590 | |
---|
591 | .Uh "User Environment" |
---|
592 | Because the display environment in which \fImhn\fR operates may vary for |
---|
593 | different machines, \fImhn\fR will look for the environment variable |
---|
594 | \fB$MHN\fR. If present, this specifies the name of an additional |
---|
595 | user profile which should be read. Hence, when a user logs in on a |
---|
596 | particular display device, this environment variable should be set to |
---|
597 | refer to a file containing definitions useful for the given display device. |
---|
598 | Normally, only entries that deal with the methods to display different |
---|
599 | content type and subtypes |
---|
600 | .sp |
---|
601 | .in +.5i |
---|
602 | mhn-show-<type>/<subtype> |
---|
603 | .br |
---|
604 | mhn-show-<type> |
---|
605 | .in -.5i |
---|
606 | .sp |
---|
607 | need be present in this additional profile. |
---|
608 | Finally, |
---|
609 | \fImhn\fR will attempt to consult one other additional user profile, |
---|
610 | .ne 6 |
---|
611 | e.g., |
---|
612 | .sp |
---|
613 | .in +.5i |
---|
614 | %etcdir%/mhn.defaults |
---|
615 | .in -.5i |
---|
616 | .sp |
---|
617 | which is created automatically during nmh installation. |
---|
618 | .Fi |
---|
619 | ^$HOME/\&.mh\(ruprofile~^The user profile |
---|
620 | ^$MHN~^Additional profile entries |
---|
621 | ^%etcdir%/mhn.defaults~^System default MIME profile entries |
---|
622 | ^%etcdir%/mhl.headers~^The headers template |
---|
623 | .Pr |
---|
624 | ^Path:~^To determine the user's nmh directory |
---|
625 | .Ps |
---|
626 | ^Current\-Folder:~^To find the default current folder |
---|
627 | .Ps |
---|
628 | ^mhlproc:~^Default program to display message headers |
---|
629 | .Ps |
---|
630 | ^nmh-access-ftp:~^Program to retrieve contents via FTP |
---|
631 | .Ps |
---|
632 | ^nmh-cache~^Public directory to store cached external contents |
---|
633 | .Ps |
---|
634 | ^nmh-private-cache~^Personal directory to store cached external contents |
---|
635 | .Ps |
---|
636 | ^mhn-charset-<charset>~^Template for environment to render character sets |
---|
637 | .Ps |
---|
638 | ^mhn-show-<type>*~^Template for displaying contents |
---|
639 | .Ps |
---|
640 | ^nmh-storage~^Directory to store contents |
---|
641 | .Ps |
---|
642 | ^mhn-store-<type>*~^Template for storing contents |
---|
643 | .Ps |
---|
644 | ^moreproc:~^Default program to display text/plain content |
---|
645 | .Sa |
---|
646 | mhbuild(1), mhl(1), sendfiles(1) |
---|
647 | .br |
---|
648 | RFC\-934: |
---|
649 | .br |
---|
650 | \fIProposed Standard for Message Encapsulation\fR, |
---|
651 | .br |
---|
652 | RFC\-2045: |
---|
653 | .br |
---|
654 | \fIMultipurpose Internet Mail Extensions (MIME) Part One: |
---|
655 | .br |
---|
656 | Format of Internet Message Bodies\fR, |
---|
657 | .br |
---|
658 | RFC\-2046: |
---|
659 | .br |
---|
660 | \fIMultipurpose Internet Mail Extensions (MIME) Part Two: |
---|
661 | .br |
---|
662 | Media Types\fR, |
---|
663 | .br |
---|
664 | RFC\-2047: |
---|
665 | .br |
---|
666 | \fIMultipurpose Internet Mail Extensions (MIME) Part Three: |
---|
667 | .br |
---|
668 | Message Header Extensions for Non-ASCII Text\fR, |
---|
669 | .br |
---|
670 | RFC\-2048: |
---|
671 | .br |
---|
672 | \fIMultipurpose Internet Mail Extensions (MIME) Part Four: |
---|
673 | .br |
---|
674 | Registration Procedures\fR, |
---|
675 | .br |
---|
676 | RFC\-2049: |
---|
677 | .br |
---|
678 | \fIMultipurpose Internet Mail Extensions (MIME) Part Five: |
---|
679 | .br |
---|
680 | Conformance Criteria and Examples\fR. |
---|
681 | .De |
---|
682 | `+folder' defaults to the current folder |
---|
683 | .Ds |
---|
684 | `msgs' defaults to cur |
---|
685 | .Ds |
---|
686 | `\-noauto' |
---|
687 | .Ds |
---|
688 | `\-nocache' |
---|
689 | .Ds |
---|
690 | `\-nocheck' |
---|
691 | .Ds |
---|
692 | `\-form mhl.headers' |
---|
693 | .Ds |
---|
694 | `\-headers' |
---|
695 | .Ds |
---|
696 | `\-pause' |
---|
697 | .Ds |
---|
698 | `\-rcache ask' |
---|
699 | .Ds |
---|
700 | `\-realsize' |
---|
701 | .Ds |
---|
702 | `\-noserialonly' |
---|
703 | .Ds |
---|
704 | `\-show' |
---|
705 | .Ds |
---|
706 | `\-noverbose' |
---|
707 | .Ds |
---|
708 | `\-wcache ask' |
---|
709 | .Co |
---|
710 | If a folder is given, it will become the current folder. The last |
---|
711 | message selected will become the current message. |
---|
712 | .Bu |
---|
713 | Partial messages contained within a multipart content are not reassembled |
---|
714 | with the `\-store' switch. |
---|
715 | .En |
---|