1DIST(1) General Commands Manual DIST(1)
2
3
4
6 dist - distribute an nmh message to additional addresses
7
9 dist [-help] [-version] [+folder] [msg] [-form formfile] [-annotate |
10 -noannotate] [-inplace | -noinplace] [-draftfolder +folder]
11 [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit]
12 [-width columns] [-from address] [-to address] [-cc address] [-fcc
13 +folder] [-whatnowproc program] [-nowhatnowproc] [-atfile] [-noat‐
14 file]
15
17 dist is similar to forw. It prepares the specified message for redis‐
18 tribution to addresses that (presumably) are not on the original ad‐
19 dress list.
20
21 The default message form contains the following elements:
22
23 Resent-From: {from switch} or <Local-Mailbox> or <username@hostname>
24 Resent-To: {to switch} or blank
25 Resent-cc: {cc switch} or blank
26 Resent-fcc: {fcc switch} or blank
27
28 If a file named “distcomps” exists in the user's nmh directory, it will
29 be used instead of this default form. You may specify an alternate
30 forms file with the switch -form formfile. Forms are processed via the
31 nmh template system; see mh-format(5) for details. Components from the
32 redistributed message are available as standard component escapes in
33 the forms file.
34
35 In addition to the standard mh-format(5) escapes, the following compo‐
36 nent escapes are also supported:
37
38 Escape Returns Description
39 fcc string Any folders specified with `-fcc folder'
40 nmh-from string Addresses specified with `-from address'
41 nmh-to string Addresses specified with `-to address'
42 nmh-cc string Addresses specified with `-cc address'
43
44 See forw(1) for descriptions of the -from, -to, -cc, and -fcc switches.
45
46 If the draft already exists, dist will ask you as to the disposition of
47 the draft. A reply of quit will abort dist, leaving the draft intact;
48 replace will replace the existing draft with a blank skeleton; and list
49 will display the draft.
50
51 Only those addresses in “Resent-To:”, “Resent-cc:”, and “Resent-Bcc:”
52 will be sent. Also, a “Resent-Fcc: folder” will be honored (see
53 send(1)). Note that with dist, the draft should contain only “Re‐
54 sent-xxx:” fields and no body. The headers and the body of the origi‐
55 nal message are copied to the draft when the message is sent. Use care
56 in constructing the headers for the redistribution.
57
58 Because the draft is minimal, the prompter(1) editor is quite useful
59 with dist.
60
61 If the -annotate switch is given, the message being distributed will
62 be annotated with the lines:
63 Resent: date
64 Resent: addrs
65 where each address list contains as many lines as required. This anno‐
66 tation will be done only if the message is sent directly from dist. If
67 the message is not sent immediately from dist, “comp -use” may be used
68 to re-edit and send the constructed message, but the annotations won't
69 take place. Normally annotations are done in place in order to pre‐
70 serve any links to the message. You may use the -noinplace switch to
71 change this.
72
73 See comp(1) for a description of the -editor and -noedit switches.
74 Note that while in the editor, with -atfile and if the current direc‐
75 tory is writable, the message being resent is available through a link
76 named “@” (assuming the default whatnowproc). In addition, the actual
77 pathname of the message is stored in the environment variable $editalt,
78 and the pathname of the folder containing the message is stored in the
79 environment variable $mhfolder. The creation of the “@” file is con‐
80 trolled via the -atfile and -noatfile options.
81
82 The -draftfolder +folder and -draftmessage msg switches invoke the nmh
83 draft folder facility. This is an advanced (and highly useful) fea‐
84 ture. Consult mh-draft(5) for more information.
85
86 Upon exiting from the editor, dist will invoke the whatnow program.
87 See whatnow(1) for a discussion of available options. The invocation
88 of this program can be inhibited by using the -nowhatnowproc switch.
89 (In fact, it is the whatnow program which starts the initial edit.
90 Hence, -nowhatnowproc will prevent any edit from occurring.)
91
93 /etc/nmh/distcomps The default message skeleton.
94 <mh-dir>/distcomps The user's message skeleton.
95 $HOME/.mh_profile The user's profile.
96 <mh-dir>/draft The draft file.
97
99 Path: To determine the user's nmh directory.
100 Current-Folder: To find the default current folder.
101 Draft-Folder: To specify the default draftfolder.
102 Editor: To override the default editor.
103 fileproc: Program to refile the message.
104 whatnowproc: Program to ask the “What now?” questions.
105
107 comp(1), forw(1), mh-draft(5), prompter(1), repl(1), send(1), what‐
108 now(1)
109
111 +folder The current folder.
112 msg The current message.
113 -noannotate
114 -nodraftfolder
115 -inplace
116 -noatfile
117
119 If a folder is given, it will become the current folder. The message
120 distributed will become the current message.
121
123 dist originally used headers of the form “Distribute-xxx:” instead of
124 “Resent-xxx:”. In order to conform with the ARPA Internet standard,
125 RFC 822, the “Resent-xxx:” form is now used. dist will recognize “Dis‐
126 tribute-xxx:” type headers and automatically convert them to “Re‐
127 sent-xxx:”.
128
130 dist does not rigorously check the message being distributed for adher‐
131 ence to the transport standard, but post called by send does. The post
132 program will balk (and rightly so) at poorly formatted messages, and
133 dist won't correct things for you.
134
135 If whatnowproc is whatnow, then comp uses a built-in whatnow, it does
136 not actually run the whatnow program. Hence, if you define your own
137 whatnowproc, don't call it whatnow since comp won't run it.
138
139
140
141nmh-1.8 2022-12-22 DIST(1)