comp and dist cannot take multiple message arguments. mhbuild does
[mmh] / man / dist.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH DIST %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 dist \- redistribute a message to additional addresses
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B dist
11 .RI [ +folder ]
12 .RI [ msg ]
13 .RB [ \-form
14 .IR formfile ]
15 .RB [ \-annotate " | " \-noannotate ] 
16 .RB [ \-inplace " | " \-noinplace ] 
17 .RB [ \-draftfolder
18 .IR +folder ]
19 .RB [ \-draftmessage
20 .IR msg ]
21 .RB [ \-nodraftfolder ]
22 .RB [ \-editor
23 .IR editor ]
24 .RB [ \-noedit ]
25 .RB [ \-width
26 .IR columns ]
27 .RB [ \-from
28 .IR address ]
29 .RB [ \-to
30 .IR address ]
31 .RB [ \-cc
32 .IR address ]
33 .RB [ \-fcc
34 .IR +folder ]
35 .RB [ \-whatnowproc
36 .IR program ]
37 .RB [ \-nowhatnowproc ]
38 .RB [ \-atfile ]
39 .RB [ \-noatfile ]
40 .RB [ \-version ]
41 .RB [ \-help ]
42 .ad
43 .SH DESCRIPTION
44 .B Dist
45 is similar to
46 .BR forw .
47 It prepares the specified message
48 for redistribution to addresses that (presumably) are not on the original
49 address list.
50 .PP
51 The default message form contains the following elements:
52 .PP
53 .RS 5
54 .nf
55 Resent-From: {from switch} or <Local-Mailbox> or <username@hostname>
56 Resent-To: {to switch} or blank
57 Resent-cc: {cc switch} or blank
58 Resent-fcc: {fcc switch} or blank
59 .fi
60 .RE
61 .PP
62 If a file named
63 .RI \*(lq distcomps \*(rq
64 exists in the user's nmh directory, it
65 will be used instead of this default form.  You may specify an alternate
66 forms file with the switch
67 .B \-form
68 .IR formfile .
69 Forms are processed via the
70 .B nmh
71 template system; see
72 .BR mh\-format (5)
73 for details.  Components from the redistributed message are available
74 as standard component escapes in the forms file.
75 .PP
76 In addition to the standard
77 .BR mh\-format (5)
78 escapes, the following
79 .I component
80 escapes are also supported:
81 .PP
82 .RS 5
83 .nf
84 .ta \w'Escape   'u +\w'Returns  'u
85 .I "Escape      Returns Description"
86 fcc     string  Any folders specified with `\-fcc\ folder'
87 nmh\-from       string  Addresses specified with `\-from\ address'
88 nmh\-to string  Addresses specified with `\-to\ address'
89 nmh\-cc string  Addresses specified with `\-cc\ address'
90 .fi
91 .RE
92 .PP
93 See the
94 .BR forw (1)
95 man page for descriptions of the
96 .BR \-from ,
97 .BR \-to ,
98 .BR \-cc ,
99 and
100 .B \-fcc
101 switches.
102 .PP
103 If the draft already exists,
104 .B dist
105 will ask you as to the disposition of the draft.  A reply of
106 .B quit
107 will abort
108 .BR dist ,
109 leaving the draft intact;
110 .B replace
111 will replace the existing draft with a blank skeleton; and
112 .B list
113 will display the draft.
114 .PP
115 Only those addresses in
116 .RI \*(lq Resent\-To: \*(rq,
117 .RI \*(lq Resent\-cc: \*(rq,
118 and
119 .RI \*(lq Resent\-Bcc: \*(rq
120 will be sent.  Also, a
121 .RI \*(lq "Resent\-Fcc: folder" \*(rq
122 will be honored (see
123 .BR send (1)).
124 Note that with
125 .BR dist ,
126 the draft should contain only
127 .RI \*(lq Resent\-xxx: \*(rq
128 fields and no body.  The headers and the body of
129 the original message are copied to the draft when the message is sent.
130 Use care in constructing the headers for the redistribution.
131 .PP
132 If the
133 .B \-annotate
134 switch is given, the  message being distributed will
135 be annotated with the lines:
136
137      Resent:\ date
138      Resent:\ addrs
139
140 where each address list contains as many lines as required.  This
141 annotation will be done only if the message is sent directly from
142 .BR dist .
143 If the message is not sent immediately from
144 .BR dist ,
145 .RB \*(lq comp
146 .BR \-use \*(rq
147 may be used to re\-edit and send the constructed
148 message, but the annotations won't take place.  Normally annotations are
149 done inplace in order to preserve any links to the message.  You may use
150 the
151 .B \-noinplace
152 switch to change this.
153 .PP
154 See
155 .BR comp (1)
156 for a description of the
157 .B \-editor
158 and
159 .B \-noedit
160 switches.  Note that while in the editor, the message being resent
161 is available through a link named \*(lq@\*(rq (assuming the default
162 .IR whatnowproc ).
163 In addition, the actual pathname of the message is
164 stored in the environment variable
165 .BR $editalt ,
166 and the pathname of
167 the folder containing the message is stored in the environment variable
168 .BR $mhfolder .
169 The creation of the \*(lq@\*(rq file and associated environment variables
170 can be controlled via the
171 .B \-atfile
172 and
173 .B \-noatfile
174 options.
175 .PP
176 The
177 .B \-draftfolder
178 .I +folder
179 and
180 .B \-draftmessage
181 .I msg
182 switches invoke the
183 .B nmh
184 draft folder facility.  This is an advanced (and highly
185 useful) feature.  Consult the
186 .BR mh-draft (5)
187 man page for more information.
188 .PP
189 Upon exiting from the editor,
190 .B dist
191 will invoke the
192 .B whatnow
193 program.  See
194 .BR whatnow (1)
195 for a discussion of available options.  The invocation of this
196 program can be inhibited by using the
197 .B \-nowhatnowproc
198 switch.  (In truth of fact, it is the
199 .B whatnow
200 program which starts the initial edit.  Hence,
201 .B \-nowhatnowproc
202 will prevent any edit from occurring.)
203
204 .SH FILES
205 .fc ^ ~
206 .nf
207 .ta \w'%etcdir%/ExtraBigFileName  'u
208 ^%etcdir%/distcomps~^The standard message skeleton
209 ^or <mh\-dir>/distcomps~^Rather than the standard skeleton
210 ^$HOME/\&.mh\(ruprofile~^The user profile
211 ^<mh\-dir>/draft~^The draft file
212 .fi
213
214 .SH "PROFILE COMPONENTS"
215 .fc ^ ~
216 .nf
217 .ta 2.4i
218 .ta \w'ExtraBigProfileName  'u
219 ^Path:~^To determine the user's nmh directory
220 ^Current\-Folder:~^To find the default current folder
221 ^Draft\-Folder:~^To find the default draft\-folder
222 ^Editor:~^To override the default editor
223 ^fileproc:~^Program to refile the message
224 ^whatnowproc:~^Program to ask the \*(lqWhat now?\*(rq questions
225 .fi
226
227 .SH "SEE ALSO"
228 comp(1), forw(1), repl(1), send(1), whatnow(1)
229
230 .SH DEFAULTS
231 .nf
232 .RB ` +folder "' defaults to the current folder"
233 .RB ` msg "' defaults to cur"
234 .RB ` \-noannotate '
235 .RB ` \-nodraftfolder '
236 .RB ` \-inplace '
237 .RB ` \-atfile '
238 .fi
239
240 .SH CONTEXT
241 If a folder is given, it will become the current folder.  The message
242 distributed will become the current message.
243
244 .SH HISTORY
245 .B Dist
246 originally used headers of the form
247 .RI \*(lq Distribute\-xxx: \*(rq
248 instead of
249 .RI \*(lq Resent\-xxx: \*(rq.
250 In order to conform with the ARPA Internet standard, RFC\-822, the
251 .RI \*(lq Resent\-xxx: \*(rq
252 form is now used.
253 .B Dist
254 will recognize
255 .RI \*(lq Distribute\-xxx: \*(rq
256 type headers and automatically convert them to
257 .RI \*(lq Resent\-xxx: \*(rq.
258
259 .SH BUGS
260 .B Dist
261 does not rigorously check the message being distributed
262 for adherence to the transport standard, but
263 .B post
264 called by
265 .B send
266 does.  The
267 .B post
268 program will balk (and rightly so) at poorly formatted messages, and
269 .B dist
270 won't correct things for you.
271 .PP
272 If
273 .I whatnowproc
274 is
275 .BR whatnow ,
276 then
277 .B comp
278 uses a built\-in
279 .BR whatnow ,
280 it does not actually run the
281 .B whatnow
282 program.
283 Hence, if you define your own
284 .IR whatnowproc ,
285 don't call it
286 .B whatnow
287 since
288 .B comp
289 won't run it.
290 .PP
291 If your current working directory is not writable, the link named
292 \*(lq@\*(rq is not available.