Added support for optional Content_Disposition header in mhbuild directive.s
[mmh] / man / repl.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH REPL %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 repl \- reply to a message
8 .SH SYNOPSIS
9 .HP 5
10 .na
11 .B repl
12 .RI [ +folder ]
13 .RI [ msgs ]
14 .RB [ \-annotate " | " \-noannotate ] 
15 .RB [ \-group " | " \-nogroup ]
16 .RB [ \-cc
17 all/to/cc/me]
18 .RB [ \-nocc
19 all/to/cc/me]
20 .RB [ \-query " | " \-noquery ]
21 .RB [ \-form
22 .IR formfile ]
23 .RB [ \-format " | " \-noformat ]
24 .RB [ \-filter
25 .IR filterfile ]
26 .RB [ \-inplace " | " \-noinplace ]
27 .RB [ \-mime " | " \-nomime ]
28 .RB [ \-fcc
29 .IR +folder ]
30 .RB [ \-width
31 .IR columns ]
32 .RB [ \-draftfolder
33 .IR +folder ]
34 .RB [ \-draftmessage
35 .IR msg ]
36 .RB [ \-nodraftfolder ]
37 .RB [ \-editor
38 .IR editor ]
39 .RB [ \-noedit ]
40 .RB [ \-whatnowproc
41 .IR program ]
42 .RB [ \-nowhatnowproc ]
43 .RB [ \-build ]
44 .RB [ \-file
45 .IR msgfile ]
46 .RB [ \-version ]
47 .RB [ \-help ]
48 .ad
49 .SH DESCRIPTION
50 .B Repl
51 may be used to produce a reply to an existing message.
52 .PP
53 In its simplest form (with no arguments),
54 .B repl
55 will set up a
56 message\-form skeleton in reply to the current message in the current
57 folder, and invoke the whatnow shell.
58 .PP
59 In order to construct the message draft of the reply,
60 .B repl
61 uses
62 a reply template to guide its actions.  A reply template is simply a
63 .B mhl
64 format file (see
65 .BR mh\-format (5)
66 for details).
67 .PP
68 If the switch
69 .B \-nogroup
70 is given (it is on by default), then
71 .B repl
72 will use the standard forms file \*(lqreplcomps\*(rq.  This will construct
73 a draft message that is intended to be sent only to the author of the
74 message to which you are replying.  If a file named \*(lqreplcomps\*(rq
75 exists in the user's
76 .B nmh
77 directory, it will be used instead of this
78 default forms file.
79 .PP
80 The default reply template \*(lqreplcomps\*(rq will direct
81 .B repl
82 to construct the reply message draft as follows:
83 .PP
84 .RS 5
85 .nf
86 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
87 cc: <To> and <cc> and <personal address>
88 Fcc: {fcc switch} or +outbox
89 Subject: Re: <Subject>
90 In\-Reply\-To: <Message\-Id>
91 References: <Message\-Id>
92 Comments: In\-Reply\-To <From> or <apparently from> or <Sender>
93 .ti +3 
94 message dated <date>
95 --------
96 .fi
97 .RE
98 .PP
99 where field names enclosed in angle brackets (<\ >) indicate the
100 contents of the named field from the message to which the reply is
101 being made.
102 .PP
103 By default, the \*(lqcc:\*(rq field is empty.  You may selectively add
104 addresses to this default with the
105 .B \-cc
106 .I type
107 switch.  This switch takes an
108 argument (
109 .IR all / to / cc / me )
110 which specifies who gets added to the default
111 \*(lqcc:\*(rq list of the reply.  You may give this switch multiple times (with
112 different arguments) if you wish to add multiple types of addresses.
113 .PP
114 If the switch
115 .B \-group
116 is given, then
117 .B repl
118 will use the the
119 standard forms file \*(lqreplgroupcomps\*(rq.  This will construct a
120 draft message that is intended as a group or followup reply.  If a file
121 named \*(lqreplgroupcomps\*(rq exists in the user's nmh directory, it
122 will be used instead of this default forms file.
123 .PP
124 The default group reply template \*(lqreplgroupcomps\*(rq will direct
125 .B repl
126 to construct the reply message draft as follows:
127 .PP
128 .RS 5
129 .nf
130 To: <Mail\-Followup\-To>
131 Subject: Re: <Subject>
132 In\-Reply\-To: Message from <From> of <Date>.
133 .ti +\w'In\-Reply\-To: 'u
134 <Message\-Id>
135 --------
136 .fi
137 .RE
138 .PP
139 or if the field <Mail\-Followup\-To> is not available:
140 .PP
141 .RS 5
142 .nf
143 To: <Mail\-Reply\-To> or <Reply\-To> or <From>
144 cc: <To> and <cc> and <personal address>
145 Subject: Re: <Subject>
146 In\-Reply\-To: Message from <From> of <Date>.
147 .ti +\w'In\-Reply\-To: 'u
148 <Message\-Id>
149 --------
150 .fi
151 .RE
152 .PP
153 By default, the \*(lqcc:\*(rq contains all the addresses shown.  You may
154 selectively remove addresses from this default with the
155 .B \-nocc
156 .I type
157 switch.
158 This switch takes an argument (
159 .IR all / to / cc / me )
160 which specifies who gets removed
161 from the default \*(lqcc:\*(rq list of the reply.  You may give this switch
162 multiple times (with different arguments) if you wish to remove multiple types
163 of addresses.
164 .PP
165 In any case, you may specify an alternate forms file with the switch
166 .B \-form
167 .IR formfile .
168 .PP
169 The
170 .B \-query
171 switch modifies the action of
172 .B \-nocc
173 .I type
174 switch by
175 interactively asking you if each address that normally would be placed in
176 the \*(lqTo:\*(rq and \*(lqcc:\*(rq list should actually be sent a copy.
177 This is useful for special\-purpose replies.  Note that the position of
178 the
179 .B \-cc
180 and
181 .B \-nocc
182 switches, like all other switches which take a
183 positive and negative form, is important.
184 .PP
185 Lines beginning with the fields \*(lqTo:\*(rq, \*(lqcc:\*(rq, and
186 \*(rqBcc:\*(rq will be standardized and have duplicate addresses removed.
187 In addition, the
188 .B \-width
189 .I columns
190 switch will guide
191 .BR repl 's
192 formatting of these fields.
193 .PP
194 If the draft already exists,
195 .B repl
196 will ask you as to the disposition
197 of the draft.  A reply of
198 .B quit
199 will abort
200 .BR repl ,
201 leaving the
202 draft intact;
203 .B replace
204 will replace the existing draft with a blank
205 skeleton; and
206 .B list
207 will display the draft.
208 .PP
209 See
210 .BR comp (1)
211 for a description of the
212 .B \-editor
213 and
214 .B \-noedit
215 switches.  Note that while in the editor, the message being replied
216 to is available through a link named \*(lq@\*(rq (assuming the default
217 .IR whatnowproc ).
218 In addition, the actual pathname of the message is
219 stored in the environment variable
220 .BR $editalt ,
221 and the pathname of
222 the folder containing the message is stored in the environment variable
223 .BR $mhfolder .
224 .PP
225 Although
226 .B repl
227 uses a forms file to direct it how to construct
228 the beginning of the draft, it uses a message filter file to direct
229 it as to how the message to which you are replying should be filtered
230 (re\-formatted) in the body of the draft.  The filter file for
231 .B repl
232 should be a standard form file for
233 .BR mhl ,
234 as
235 .B repl
236 will invoke
237 .B mhl
238 to format the message to which you are replying.
239 .PP
240 The switches
241 .BR \-noformat ,
242 .BR \-format ,
243 and
244 .B \-filter
245 .I filterfile
246 specify
247 which message filter file to use.
248 .PP
249 If the switch
250 .B \-noformat
251 is given (it is the default), then the message
252 to which you are replying is not included in the body of the draft.
253 .PP
254 If the switch
255 .B \-format
256 is given, then a default message filter file
257 is used.  This default message filter should be adequate for most users.
258 This default filter
259 .RI \*(lq mhl.reply \*(rq
260 is:
261 .PP
262 .RS 5
263 .nf
264 %mhl_reply%
265 .fi
266 .RE
267 .PP
268 which outputs each line of the body of the message prefaced with the
269 \*(lq>\*(rq character and a space.
270 .PP
271 If a file named
272 .RI \*(lq mhl.reply \*(rq
273 exists in the user's
274 .B nmh
275 directory,
276 it will be used instead of this form.  You may specify an alternate
277 message filter file with the switch
278 .B \-filter
279 .IR filterfile .
280 .PP
281 Other reply filters are commonly used, such as:
282 .PP
283 .RS 5
284 .nf
285 :
286 body:nocomponent,compwidth=9,offset=9
287 .fi
288 .RE
289 .PP
290 which says to output a blank line and then the body of the message
291 being replied\-to, indented by one tab\-stop.  Another popular format
292 is:
293 .PP
294 .RS 5
295 .nf
296 message-id:nocomponent,\|nonewline,\\
297 formatfield=\*(lqIn message %{text},\ \*(rq
298 from:nocomponent,\|formatfield=\*(lq%(friendly{text}) writes:\*(rq
299 body:component=\*(lq>\*(rq,\|overflowtext=\*(lq>\*(rq,\|overflowoffset=0
300 .fi
301 .RE
302 .PP
303 This message filter file cites the Message-ID and author of the message
304 being replied\-to, and then outputs each line of the body prefaced with
305 the \*(lq>\*(rq character.
306 .PP
307 To use the MIME rules for encapsulation, specify the
308 .B \-mime
309 switch.
310 This directs
311 .B repl
312 to generate an
313 .B mhbuild
314 composition file.
315 Note that
316 .B nmh
317 will not invoke
318 .B mhbuild
319 automatically, unless you
320 add this line to your
321 .I \&.mh\(ruprofile
322 file:
323 .PP
324 .RS 5
325 automimeproc: 1
326 .RE
327 .PP
328 Otherwise, you must specifically give the command
329 .PP
330 .RS 5
331 What now? mime
332 .RE
333 .PP
334 prior to sending the draft.
335 .PP
336 If the
337 .B \-annotate
338 switch is given, the message being replied\-to will
339 be annotated with the lines
340 .PP
341 .RS 5
342 Replied:\ date
343 Replied:\ addrs
344 .RE
345 .PP
346 where the address list contains one line for each addressee.
347 The annotation will be done only if the message is sent directly from
348 .BR repl .
349 If the message is not sent immediately from
350 .BR repl ,
351 .RB \*(lq "comp\ \-use" \*(rq
352 may be used to re\-edit and send the constructed
353 message, but the annotations won't take place.  Normally annotations are
354 done inplace in order to preserve any links to the message.  You may use
355 the
356 .B \-noinplace
357 switch to change this.
358 .PP
359 Although the default template specifies that a copy of the reply will be
360 put in
361 the folder 'outbox',
362 if the
363 .B \-fcc
364 .I +folder
365 switch is given it will override the default value.
366 More than one folder, each preceded by
367 .B \-fcc
368 can
369 be named.
370 .PP
371 In addition to the standard
372 .BR mh\-format (5)
373 escapes,
374 .B repl
375 also recognizes the following additional
376 .I component
377 escape:
378 .PP
379 .RS 5
380 .nf
381 .ta \w'Escape  'u +\w'Returns  'u
382 .I Escape       Returns Description
383 fcc     string  Any folders specified with `\-fcc\ folder'
384 .fi
385 .RE
386 .PP
387 To avoid reiteration,
388 .B repl
389 strips any leading `Re: ' strings from
390 the
391 .I subject
392 component.
393 .PP
394 The
395 .B \-draftfolder
396 .I +folder
397 and
398 .B \-draftmessage
399 .I msg
400 switches invoke
401 the
402 .B nmh
403 draft folder facility.  This is an advanced (and highly
404 useful) feature.  Consult the
405 .BR mh-draft (5)
406 man page for more
407 information.
408 .PP
409 Upon exiting from the editor,
410 .B repl
411 will invoke the
412 .B whatnow
413 program.  See
414 .BR whatnow (1)
415 for a discussion of available
416 options.  The invocation of this program can be inhibited by using the
417 .B \-nowhatnowproc
418 switch.  (In truth of fact, it is the
419 .B whatnow
420 program which starts the initial edit.  Hence,
421 .B \-nowhatnowproc
422 will
423 prevent any edit from occurring.)
424 .PP
425 The
426 .B \-build
427 switch is intended to be used by the Emacs mh-e interface
428 to
429 .BR nmh ,
430 and is only present if
431 .B nmh
432 was compiled with support
433 for mh-e. It implies
434 .BR \-nowhatnowproc .
435 It causes a file
436 .I <mh\-dir>/reply
437 to be created, containing the draft message that would normally be presented
438 to the user for editing.
439 No mail is actually sent. Note that this switch is not guaranteed to
440 be present or to have the same effects in future versions of
441 .BR nmh :
442 it is documented here only for completeness.
443 .PP
444 The
445 .B \-file
446 .I msgfile
447 switch specifies the message to be replied to as an 
448 exact filename rather than as an
449 .B nmh
450 folder and message number. It is 
451 intended to be used by the
452 .B msh
453 interface to
454 .BR nmh . 
455 The same caveats apply to this option as to the
456 .B \-build
457 switch.
458
459 .SH FILES
460 .fc ^ ~
461 .nf
462 .ta \w'%etcdir%/ExtraBigFileName  'u
463 ^%etcdir%/replcomps~^The standard reply template
464 ^or <mh\-dir>/replcomps~^Rather than the standard template
465 ^%etcdir%/replgroupcomps~^The standard `reply -group' template
466 ^or <mh\-dir>/replgroupcomps~^Rather than the standard template
467 ^%etcdir%/mhl.reply~^The standard message filter
468 ^or <mh\-dir>/mhl.reply~^Rather than the standard filter
469 ^$HOME/\&.mh\(ruprofile~^The user profile
470 ^<mh\-dir>/draft~^The draft file
471 .fi
472
473 .SH "PROFILE COMPONENTS"
474 .fc ^ ~
475 .nf
476 .ta 2.4i
477 .ta \w'ExtraBigProfileName  'u
478 ^Path:~^To determine the user's nmh directory
479 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
480 ^Current\-Folder:~^To find the default current folder
481 ^Draft\-Folder:~^To find the default draft\-folder
482 ^Editor:~^To override the default editor
483 ^Msg\-Protect:~^To set mode when creating a new message (draft)
484 ^fileproc:~^Program to refile the message
485 ^mhlproc:~^Program to filter message being replied\-to
486 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
487 .fi
488
489 .SH "SEE ALSO"
490 mhbuild(1), comp(1), forw(1), send(1), whatnow(1), mh\-format(5)
491
492 .SH DEFAULTS
493 .nf
494 .RB ` +folder "' defaults to the current folder"
495 .RB ` msg "' defaults to cur"
496 .RB ` \-nogroup '
497 .RB ` "\-nocc\ all" "' with `\-nogroup', `\-cc\ all' with `\-group'"
498 .RB ` \-noannotate '
499 .RB ` \-nodraftfolder '
500 .RB ` \-noformat '
501 .RB ` \-inplace '
502 .RB ` \-nomime '
503 .RB ` \-noquery '
504 .RB ` "\-width\ 72" '
505 .fi
506
507 .SH CONTEXT
508 If a folder is given, it will become the current folder.  The message
509 replied\-to will become the current message.
510
511 .SH BUGS
512 If any addresses occur in the reply template, addresses in the template
513 that do not contain hosts are defaulted incorrectly.  Instead of using
514 the localhost for the default,
515 .B repl
516 uses the sender's host.
517 Moral of the story: if you're going to include addresses in a reply
518 template, include the host portion of the address.
519 .PP
520 The
521 .B \-width
522 .I columns
523 switch is only used to do address-folding; other
524 headers are not line\-wrapped.
525 .PP
526 If
527 .I whatnowproc
528 is
529 .BR whatnow ,
530 then
531 .B repl
532 uses a built\-in
533 .BR whatnow ,
534 it does not actually run the
535 .B whatnow
536 program.
537 Hence, if you define your own
538 .IR whatnowproc ,
539 don't call it
540 .B whatnow
541 since
542 .B repl
543 won't run it.
544 .PP
545 If your current working directory is not writable, the link named
546 \*(lq@\*(rq is not available.