Allow whatnow to accept "l" as an abbreviation for "list", instead of
[mmh] / man / forw.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH FORW %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 forw \- forward messages
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B forw
11 .RI [ +folder ]
12 .RI [ msgs ]
13 .RB [ \-annotate " | " \-noannotate ] 
14 .RB [ \-form
15 .IR formfile ]
16 .RB [ \-format " | " \-noformat ]
17 .RB [ \-filter
18 .IR filterfile ]
19 .RB [ \-inplace " | " \-noinplace ]
20 .RB [ \-mime " | " \-nomime ]
21 .RB [ \-draftfolder
22 .IR +folder ]
23 .RB [ \-draftmessage
24 .IR msg ]
25 .RB [ \-nodraftfolder ]
26 .RB [ \-editor
27 .IR editor ]
28 .RB [ \-noedit ]
29 .RB [ \-width
30 .IR colums ]
31 .RB [ \-from
32 .IR address ]
33 .RB [ \-to
34 .IR address ]
35 .RB [ \-cc
36 .IR address ]
37 .RB [ \-fcc
38 .IR +folder ]
39 .RB [ \-subject
40 .IR text ]
41 .RB [ \-whatnowproc
42 .IR program ]
43 .RB [ \-nowhatnowproc ]
44 .RB [ \-dashstuffing " | " \-nodashstuffing ]
45 .RB [ \-build ]
46 .RB [ \-file
47 .IR msgfile ]
48 .RB [ \-version ]
49 .RB [ \-help ]
50 .PP
51 .HP 5
52 .B forw
53 .RI [ +folder ]
54 .RI [ msgs ]
55 .RB [ \-digest
56 .IR list ]
57 .RB [ \-issue
58 .IR number ]
59 .RB [ \-volume
60 .IR number ]
61 [other\ switches\ for\ 
62 .BR forw ]
63 .RB [ \-version ]
64 .RB [ \-help ]
65 .ad
66 .SH DESCRIPTION
67 .B Forw
68 may be used to prepare a message containing other messages.
69 .PP
70 It constructs the new message from a forms (components) file, with a
71 body composed of the message(s) to be forwarded.  An editor is invoked
72 as in
73 .BR comp ,
74 and after editing is complete, the user is prompted
75 before the message is sent.
76 .PP
77 The default message template will direct
78 .B forw
79 to construct the draft as follows:
80 .PP
81 .RS 5
82 .nf
83 From: {from switch} or <Local-Mailbox> or <username@hostname>
84 To: {to switch} or blank
85 Fcc: {fcc switch} or +outbox
86 Subject: {subject switch} or "{original subject} (fwd)"
87 --------
88 .fi
89 .RE
90 .PP
91 If a file named
92 .RI \*(lq forwcomps \*(rq
93 exists in the user's nmh directory,
94 it will be used instead of this default form.  You may also specify an
95 alternate forms file with the switch
96 .B \-form
97 .IR formfile .
98 Forms are processed via the
99 .B nmh
100 template system; see
101 .BR mh\-format (5)
102 for details.  Components from the first forwarded message are available
103 as standard component escapes in the forms file.
104 .PP
105 In addition to the standard
106 .BR mh\-format (5)
107 escapes, the following
108 .I component
109 escapes are also supported:
110 .PP
111 .RS 5
112 .nf
113 .ta \w'nmh\-subject     'u +\w'Returns  'u
114 .I "Escape      Returns Description"
115 fcc     string  Any folders specified with `\-fcc\ folder'
116 nmh\-from       string  Addresses specified with `\-from\ address'
117 nmh\-to string  Addresses specified with `\-to\ address'
118 nmh\-cc string  Addresses specified with `\-cc\ address'
119 nmh\-subject    string  Any text specified with `\-subject\ text'
120 .fi
121 .RE
122 .PP
123 By default the \*(lqTo:\*(rq and \*(lqcc:\*(rq fields are empty.  You may
124 add addresses to these fields with the
125 .B \-to
126 .I address
127 and
128 .B \-cc
129 .I address
130 switches.  You may give these switches multiple times to add multiple
131 addresses.
132 .PP
133 By default the \*(lqFrom:\*(rq field has either the value of the
134 .B Local\-Mailbox
135 profile entry a system default email address.  This default can be overridden
136 by using the
137 .B \-from
138 .I address
139 switch.  The default mailbox in the \*(lqFcc:\*(rq field is
140 .IR +outbox .
141 This can be overridden by the
142 .B \-fcc
143 switch.
144 .PP
145 Any text you give to the
146 .B \-subject
147 switch will be placed in the \*(lqSubject:\*(rq field in the draft.
148 .PP
149 If the draft already exists,
150 .B forw
151 will ask you as to the disposition
152 of the draft.  A reply of
153 .B quit
154 will abort
155 .BR forw ,
156 leaving the draft intact;
157 .B replace
158 will replace the existing draft with a blank skeleton; and
159 .B list
160 will display the draft.
161 .PP
162 If the
163 .B \-annotate
164 switch is given, each message being forwarded will
165 be annotated with the lines:
166 .PP
167 .RS 5
168 .nf
169 Forwarded:\ date
170 Forwarded:\ addrs
171 .fi
172 .RE
173 .PP
174 where each address list contains as many lines as required.  This
175 annotation will be done only if the message is sent directly from
176 .BR forw .
177 If the message is not sent immediately from
178 .BR forw ,
179 .RB \*(lq comp
180 .BR \-use \*(rq
181 may be used to re\-edit and send the constructed
182 message, but the annotations won't take place.  Normally annotations
183 are done inplace in order to preserve any links to the message.  You may
184 change this by using the
185 .B \-noinplace
186 switch.
187 .PP
188 See
189 .BR comp (1)
190 for a description of the
191 .B \-editor
192 and
193 .B \-noedit
194 switches.
195 .PP
196 Although
197 .B forw
198 uses a forms (components) file to direct it how to
199 construct the beginning of the draft, it uses a message filter file to
200 direct it as to how each forwarded message should be formatted in the
201 body of the draft.  The filter file for \fIforw\fR should be a standard
202 form file for
203 .BR mhl ,
204 as
205 .B forw
206 will invoke
207 .B mhl
208 to filter (re\-format) the forwarded messages prior to being output to
209 the body of the draft.
210 .PP
211 The switches
212 .BR \-noformat ,
213 .BR \-format ,
214 and
215 .B \-filter
216 .I filterfile
217 specify which message filter file to use.
218 .PP
219 If
220 .B \-noformat
221 is specified (this is the default), then each forwarded
222 message is output into the draft exactly as it appears with no
223 .B mhl
224 filtering.
225 .PP
226 If
227 .B \-format
228 is specified, then a default message filter file is used.
229 This default message filter should be adequate for most users.
230 This default filter
231 .RI \*(lq mhl.forward \*(rq
232 is:
233 .PP
234 .RS 5
235 .nf
236 %mhl_forward%
237 .fi
238 .RE
239 .PP
240 If a file named
241 .RI \*(lq mhl.forward \*(rq
242 exists in the user's nmh
243 directory, it will be used instead of this form.  You may specify an
244 alternate message filter file with the switch
245 .B \-filter
246 .IR filterfile .
247 .PP
248 Each forwarded message is separated with an encapsulation delimiter.
249 By default, any dashes in the first column of the forwarded messages
250 will be prepended with `\-\ ' so that when received, the message is
251 suitable for bursting by
252 .BR burst .
253 This follows the Internet RFC\-934 guidelines.  You may use the flag
254 .B \-nodashstuffing
255 in order
256 to suppress this form of quoting to the forwarded messages.
257 .PP
258 For users of
259 .BR prompter ,
260 by specifying
261 .BR prompter 's
262 .B \-prepend
263 switch in the
264 .I \&.mh\(ruprofile
265 file, any commentary text is entered
266 before the forwarded messages.  (A major win!)
267 .PP
268 To use the MIME rules for encapsulation, specify the
269 .B \-mime
270 switch. This directs
271 .B forw
272 to generate an
273 .B mhbuild
274 composition file. Note that
275 .B nmh
276 will not invoke
277 .B mhbuild
278 automatically, unless you
279 add this line to your
280 .I \&.mh\(ruprofile
281 file:
282 .PP
283 .RS 5
284 .nf
285 automimeproc: 1
286 .fi
287 .RE
288 .PP
289 Otherwise, you must specifically give the command
290 .PP
291 .RS 5
292 .nf
293 What now? mime
294 .fi
295 .RE
296 .PP
297 prior to sending the draft.
298 .PP
299 The
300 .B \-draftfolder
301 .I +folder
302 and
303 .B \-draftmessage
304 .I msg
305 switches invoke the
306 .B nmh
307 draft folder facility.  This is an advanced (and highly
308 useful) feature.  Consult the
309 .BR mh-draft (5)
310 man page for more information.
311 .PP
312 The
313 .B \-editor
314 .I editor
315 switch indicates the editor to use for the
316 initial edit.  Upon exiting from the editor,
317 .B comp
318 will invoke the
319 .B whatnow
320 program.  See
321 .BR whatnow (1)
322 for a discussion of
323 available options.  The invocation of this program can be inhibited
324 by using the
325 .B \-nowhatnowproc
326 switch.  (In truth of fact, it is
327 the
328 .I whatnow
329 program which starts the initial edit.  Hence,
330 .B \-nowhatnowproc
331 will prevent any edit from occurring.)
332 .PP
333 The
334 .B \-build
335 switch is intended to be used by the Emacs mh-e interface to
336 .BR nmh .
337 It implies
338 .BR \-nowhatnowproc .
339 It causes a file <mh\-dir>/draft
340 to be created, containing the draft message that would normally be presented
341 to the user for editing.
342 No mail is actually sent.
343 .PP
344 The
345 .B \-file
346 .I msgfile
347 switch specifies the message to be forwarded as an 
348 exact filename rather than as an
349 .B nmh
350 folder and message number. It is 
351 intended to be used by the
352 .B msh
353 interface to
354 .BR nmh . 
355 This switch implies
356 .BR \-noannotate .
357 The forwarded message is simply
358 copied verbatim into the draft; the processing implied by
359 the
360 .BR \-filter ,
361 .BR \-mime ,
362 and
363 .B \-digest
364 switches is bypassed, and the usual leading and
365 trailing 'Forwarded Message' delimiters are not added.
366 The same caveats apply to this option as to the
367 .B \-build
368 switch.
369 .PP
370 The
371 .B \-digest
372 .IR list ,
373 .B \-issue
374 .IR number ,
375 and
376 .B \-volume
377 .I number
378 switches implement a digest facility for
379 .BR nmh .
380 Specifying these switches enables and/or overloads the following escapes:
381 .PP
382 .RS 5
383 .nf
384 .ta \w'Component  'u +\w'Escape  'u +\w'Returns  'u
385 .I "Type        Escape  Returns Description"
386 component       digest  string  Argument to `\-digest'
387 function        cur     integer Argument to `\-volume'
388 function        msg     integer Argument to `\-issue'
389 .fi
390 .RE
391 .PP
392 Consult the
393 .I "Advanced Features"
394 section of the
395 .B nmh
396 User's Manual for more information on making digests.
397
398 .SH FILES
399 .fc ^ ~
400 .nf
401 .ta \w'%etcdir%/ExtraBigFileName  'u
402 ^%etcdir%/forwcomps~^The standard message skeleton
403 ^or <mh\-dir>/forwcomps~^Rather than the standard skeleton
404 ^%etcdir%/digestcomps~^The message skeleton if `\-digest' is given
405 ^or <mh\-dir>/digestcomps~^Rather than the standard skeleton
406 ^%etcdir%/mhl.forward~^The standard message filter
407 ^or <mh\-dir>/mhl.forward~^Rather than the standard filter
408 ^$HOME/\&.mh\(ruprofile~^The user profile
409 ^<mh\-dir>/draft~^The draft file
410 .fi
411
412 .SH "PROFILE COMPONENTS"
413 .fc ^ ~
414 .nf
415 .ta 2.4i
416 .ta \w'ExtraBigProfileName  'u
417 ^Path:~^To determine the user's nmh directory
418 ^Current\-Folder:~^To find the default current folder
419 ^Draft\-Folder:~^To find the default draft\-folder
420 ^Editor:~^To override the default editor
421 ^Msg\-Protect:~^To set mode when creating a new message (draft)
422 ^fileproc:~^Program to refile the message
423 ^mhlproc:~^Program to filter messages being forwarded
424 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
425 .fi
426
427 .SH "SEE ALSO"
428 mhbuild(1), comp(1), repl(1), send(1), whatnow(1), mh\-format(5),
429 .I "Proposed Standard for Message Encapsulation"
430 (RFC\-934)
431
432 .SH DEFAULTS
433 .nf
434 .RB ` +folder "' defaults to the current folder"
435 .RB ` msgs "' defaults to cur"
436 .RB ` \-noannotate '
437 .RB ` \-nodraftfolder '
438 .RB ` \-noformat '
439 .RB ` \-inplace '
440 .RB ` \-dashstuffing '
441 .RB ` \-nomime '
442 .fi
443
444 .SH CONTEXT
445 If a folder is given, it will become the current folder.
446 The first message forwarded will become the current message.
447
448 .SH BUGS
449 If
450 .I whatnowproc
451 is
452 .BR whatnow ,
453 then
454 .B forw
455 uses a built\-in
456 .BR whatnow ,
457 it does not actually run the
458 .B whatnow
459 program.
460 Hence, if you define your own
461 .IR whatnowproc ,
462 don't call it
463 .B whatnow
464 since
465 .B forw
466 won't run it.
467 .PP
468 When
469 .B forw
470 is told to annotate the messages it forwards, it
471 doesn't actually annotate them until the draft is successfully sent.
472 If from the
473 .IR whatnowproc ,
474 you
475 .B push
476 instead of
477 .BR send ,
478 it's possible to confuse
479 .B forw
480 by re\-ordering the file (e.g. by using
481 .RB \*(lq folder
482 .BR \-pack \*(rq)
483 before the message is successfully sent.
484 .B Dist
485 and
486 .B repl
487 don't have this problem.