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