]> diplodocus.org Git - nmh/blob - man/dist.man
Reverted commit 9a4b4a3d3b27fe4a7ff6d0b8724ce1c06b5917eb.
[nmh] / man / dist.man
1 .TH DIST %manext1% "June 18, 2012" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 dist \- redistribute a message to additional addresses
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B dist
11 .RB [ \-help ]
12 .RB [ \-version ]
13 .RI [ +folder ]
14 .RI [ msg ]
15 .RB [ \-form
16 .IR formfile ]
17 .RB [ \-annotate " | " \-noannotate ]
18 .RB [ \-inplace " | " \-noinplace ]
19 .RB [ \-draftfolder
20 .IR +folder ]
21 .RB [ \-draftmessage
22 .IR msg ]
23 .RB [ \-nodraftfolder ]
24 .RB [ \-editor
25 .IR editor ]
26 .RB [ \-noedit ]
27 .RB [ \-width
28 .IR columns ]
29 .RB [ \-from
30 .IR address ]
31 .RB [ \-to
32 .IR address ]
33 .RB [ \-cc
34 .IR address ]
35 .RB [ \-fcc
36 .IR +folder ]
37 .RB [ \-whatnowproc
38 .IR program ]
39 .RB [ \-nowhatnowproc ]
40 .RB [ \-atfile ]
41 .RB [ \-noatfile ]
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 .IR 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 .IR 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 .IR 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 .IR 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 Because the draft is minimal, the
133 .IR prompter (1)
134 editor is quite useful with
135 .BR dist .
136 .PP
137 If the
138 .B \-annotate
139 switch is given, the message being distributed will
140 be annotated with the lines:
141 .RS
142 Resent:\ date
143 .br
144 Resent:\ addrs
145 .RE
146 where each address list contains as many lines as required. This
147 annotation will be done only if the message is sent directly from
148 .BR dist .
149 If the message is not sent immediately from
150 .BR dist ,
151 .RB \*(lq comp
152 .BR \-use \*(rq
153 may be used to re\-edit and send the constructed
154 message, but the annotations won't take place. Normally annotations are
155 done inplace in order to preserve any links to the message. You may use
156 the
157 .B \-noinplace
158 switch to change this.
159 .PP
160 See
161 .IR comp (1)
162 for a description of the
163 .B \-editor
164 and
165 .B \-noedit
166 switches. Note that while in the editor, with
167 .B \-atfile
168 and if the current directory is writable, the message being resent
169 is available through a link named \*(lq@\*(rq (assuming the default
170 .IR whatnowproc ).
171 In addition, the actual pathname of the message is
172 stored in the environment variable
173 .BR $editalt ,
174 and the pathname of
175 the folder containing the message is stored in the environment variable
176 .BR $mhfolder .
177 The creation of the \*(lq@\*(rq file is controlled via the
178 .B \-atfile
179 and
180 .B \-noatfile
181 options.
182 .PP
183 The
184 .B \-draftfolder
185 .I +folder
186 and
187 .B \-draftmessage
188 .I msg
189 switches invoke the
190 .B nmh
191 draft folder facility. This is an advanced (and highly
192 useful) feature. Consult the
193 .IR mh-draft (5)
194 man page for more information.
195 .PP
196 Upon exiting from the editor,
197 .B dist
198 will invoke the
199 .B whatnow
200 program. See
201 .IR whatnow (1)
202 for a discussion of available options. The invocation of this
203 program can be inhibited by using the
204 .B \-nowhatnowproc
205 switch. (In truth of fact, it is the
206 .B whatnow
207 program which starts the initial edit. Hence,
208 .B \-nowhatnowproc
209 will prevent any edit from occurring.)
210 .SH FILES
211 .PD 0
212 .TP 20
213 %nmhetcdir%/distcomps
214 The standard message skeleton.
215 .TP 20
216 <mh\-dir>/distcomps
217 An alternative to the standard skeleton.
218 .TP 20
219 $HOME/\&.mh\(ruprofile
220 The user's profile.
221 .TP 20
222 <mh\-dir>/draft
223 The draft file.
224 .PD
225 .SH "PROFILE COMPONENTS"
226 .PD 0
227 .TP 20
228 Path:
229 To determine the user's nmh directory.
230 .TP 20
231 Current\-Folder:
232 To find the default current folder.
233 .TP 20
234 Draft\-Folder:
235 To find the default draft\-folder.
236 .TP 20
237 Editor:
238 To override the default editor.
239 .TP 20
240 fileproc:
241 Program to refile the message.
242 .TP 20
243 whatnowproc:
244 Program to ask the \*(lqWhat now?\*(rq questions.
245 .PD
246 .SH "SEE ALSO"
247 .IR comp (1),
248 .IR forw (1),
249 .IR prompter (1),
250 .IR repl (1),
251 .IR send (1),
252 .IR whatnow (1)
253 .SH DEFAULTS
254 .PD 0
255 .TP 20
256 +folder
257 The current folder.
258 .TP 20
259 msg
260 The current message.
261 .TP 20
262 \-noannotate
263 .TP 20
264 \-nodraftfolder
265 .TP 20
266 \-inplace
267 .TP 20
268 \-noatfile
269 .PD
270 .SH CONTEXT
271 If a folder is given, it will become the current folder. The message
272 distributed will become the current message.
273 .SH HISTORY
274 .B dist
275 originally used headers of the form
276 .RI \*(lq Distribute\-xxx: \*(rq
277 instead of
278 .RI \*(lq Resent\-xxx: \*(rq.
279 In order to conform with the ARPA Internet standard, RFC 822, the
280 .RI \*(lq Resent\-xxx: \*(rq
281 form is now used.
282 .B dist
283 will recognize
284 .RI \*(lq Distribute\-xxx: \*(rq
285 type headers and automatically convert them to
286 .RI \*(lq Resent\-xxx: \*(rq.
287 .SH BUGS
288 .B dist
289 does not rigorously check the message being distributed
290 for adherence to the transport standard, but
291 .B post
292 called by
293 .B send
294 does. The
295 .B post
296 program will balk (and rightly so) at poorly formatted messages, and
297 .B dist
298 won't correct things for you.
299 .PP
300 If
301 .I whatnowproc
302 is
303 .BR whatnow ,
304 then
305 .B comp
306 uses a built\-in
307 .BR whatnow ,
308 it does not actually run the
309 .B whatnow
310 program.
311 Hence, if you define your own
312 .IR whatnowproc ,
313 don't call it
314 .B whatnow
315 since
316 .B comp
317 won't run it.