File: dist.man

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