1FORW(1) General Commands Manual FORW(1)
2
3
4
6 forw - forward nmh messages
7
9 forw [-help] [-version] [+folder] [msgs] [-annotate | -noannotate]
10 [-form formfile] [-format | -noformat] [-filter filterfile] [-in‐
11 place | -noinplace] [-mime | -nomime] [-draftfolder +folder]
12 [-draftmessage msg] [-nodraftfolder] [-editor editor] [-noedit]
13 [-width columns] [-from address] [-to address] [-cc address] [-fcc
14 +folder] [-subject text] [-whatnowproc program] [-nowhatnowproc]
15 [-dashstuffing | -nodashstuffing] [-build] [-file msgfile]
16
17 forw [-help] [-version] [+folder] [msgs] [-digest list] [-issue number]
18 [-volume number] [other switches for forw]
19
21 forw constructs a new message from a forms (components) file, with a
22 body composed of the message(s) to be forwarded. An editor is invoked
23 and, after editing is complete, the user is prompted before the message
24 is sent.
25
26 The default message template will direct forw to construct the draft as
27 follows:
28
29 From: {from switch} or <Local-Mailbox> or <username@hostname>
30 To: {to switch} or blank
31 Fcc: {fcc switch} or +outbox
32 Subject: {subject switch} or "{original subject} (fwd)"
33 --------
34
35 If a file named “forwcomps” exists in the user's nmh directory, it will
36 be used instead of this default form. You may also specify an alter‐
37 nate forms file with the switch -form formfile. Forms are processed
38 via the nmh template system; see mh-format(5) for details. Components
39 from the first forwarded message are available as standard component
40 escapes in the forms file.
41
42 In addition to the standard mh-format escapes, the following component
43 escapes are also supported:
44
45 Escape Returns Description
46 fcc string Any folders specified with `-fcc folder'
47 nmh-from string Addresses specified with `-from address'
48 nmh-to string Addresses specified with `-to address'
49 nmh-cc string Addresses specified with `-cc address'
50 nmh-subject string Any text specified with `-subject text'
51
52 By default, the “To:” and “cc:” fields are empty. You may add ad‐
53 dresses to these fields with the -to address and -cc address switches.
54 You may give these switches multiple times to add multiple addresses.
55
56 By default, the “From:” field contains either the value of the Lo‐
57 cal-Mailbox profile entry, or a system default email address. This de‐
58 fault can be overridden by using the -from address switch. The default
59 mailbox in the “Fcc:” field is +outbox. This can be overridden by the
60 -fcc switch.
61
62 Any text given to the -subject switch will be placed in the “Subject:”
63 field in the draft.
64
65 If the draft already exists, forw will ask you as to the disposition of
66 the draft. A reply of quit will abort forw, leaving the draft intact;
67 replace will replace the existing draft with a blank skeleton; and list
68 will display the draft.
69
70 If the -annotate switch is given, each message being forwarded will be
71 annotated with the lines:
72
73 Forwarded: date
74 Forwarded: addrs
75
76 where each address list contains as many lines as required. This anno‐
77 tation will be done only if the message is sent directly from forw. If
78 the message is not sent immediately from forw, “comp -use” may be used
79 to re-edit and send the constructed message, but the annotations won't
80 take place. Normally, annotations are done in place in order to pre‐
81 serve any links to the message. You may change this by using the
82 -noinplace switch.
83
84 See comp(1) for a description of the -editor and -noedit switches.
85
86 Although forw uses a forms (components) file to construct the initial
87 draft, a message filter file is used to format each forwarded message
88 in the body of the draft. The filter file for forw should be a stan‐
89 dard form file for mhl(1), as forw will invoke mhl to filter (re-for‐
90 mat) the forwarded messages prior to being output to the body of the
91 draft.
92
93 The switches -noformat, -format, and -filter filterfile specify which
94 message filter file to use. If -noformat is specified (this is the de‐
95 fault), then each forwarded message is output into the draft exactly as
96 it appears, with no mhl filtering. If -format is specified, then the
97 following default message filter file, “mhl.forward”, which should be
98 adequate for most users, is used:
99
100 ; mhl.forward
101 ;
102 ; default message filter for `forw' (forw -format)
103 ;
104 width=80,overflowtext=,overflowoffset=10
105 leftadjust,compress,compwidth=9
106 Date:formatfield="%<(nodate{text})%{text}%|%(tws{text})%>"
107 From:
108 To:
109 cc:
110 Subject:
111 :
112 body:nocomponent,overflowoffset=0,noleftadjust,nocompress
113
114 If a file named “mhl.forward” exists in the user's nmh directory, it
115 will be used instead. You may specify an alternate message filter file
116 with the switch -filter filterfile.
117
118 Each forwarded message is separated with an encapsulation delimiter.
119 By default, any dashes in the first column of the forwarded messages
120 will be prepended with `- ' so that when received, the message is suit‐
121 able for bursting by burst(1). This follows the guidelines in RFC 934.
122 You may use the -nodashstuffing switch to suppress this form of quot‐
123 ing.
124
125 Users of prompter(1) can, by specifying prompter's -prepend switch in
126 the .mh_profile file, prepend any commentary text before the forwarded
127 messages.
128
129 To use the MIME rules for encapsulation, specify the -mime switch.
130 This directs forw to generate an mhbuild composition file. Note that
131 nmh will not invoke mhbuild automatically; you must specifically give
132 the command
133
134 What now? mime
135
136 prior to sending the draft.
137
138 The -draftfolder +folder and -draftmessage msg switches invoke the nmh
139 draft folder facility. This is an advanced (and highly useful) fea‐
140 ture. Consult mh-draft(5) for more information.
141
142 The -editor editor switch indicates the editor to use for the initial
143 edit. Upon exiting from the editor, comp will invoke the whatnow pro‐
144 gram. See whatnow(1) for a discussion of available options. The invo‐
145 cation of this program can be inhibited by using the -nowhatnowproc
146 switch. (In fact, it is the whatnow program which starts the initial
147 edit. Hence, -nowhatnowproc will prevent any edit from occurring.)
148
149 The -build switch is intended to be used by the Emacs mh-e interface to
150 nmh. It implies -nowhatnowproc. It causes a file <mh-dir>/draft to be
151 created, containing the draft message that would normally be presented
152 to the user for editing. No mail is actually sent.
153
154 The -file msgfile switch specifies the message to be forwarded as an
155 exact filename rather than as an nmh folder and message number. This
156 switch implies -noannotate. The forwarded message is simply copied
157 verbatim into the draft; the processing implied by the -filter, -mime,
158 and -digest switches is bypassed, and the usual leading and trailing
159 'Forwarded Message' delimiters are not added. The same caveats apply
160 to this option as to the -build switch.
161
162 The -digest list, -issue number, and -volume number switches implement
163 a digest facility for nmh. Specifying these switches enables and/or
164 overloads the following escapes:
165
166 Type Escape Returns Description
167 component digest string Argument to `-digest'
168 function cur integer Argument to `-volume'
169 function msg integer Argument to `-issue'
170
172 forw looks for format and filter files in multiple locations: absolute
173 pathnames are accessed directly, tilde expansion is done on usernames,
174 and files are searched for in the user's Mail directory as specified in
175 their profile. If not found there, the directory “/etc/nmh” is
176 checked.
177
178 /etc/nmh/forwcomps The default message skeleton.
179 <mh-dir>/forwcomps The user's message skeleton.
180 /etc/nmh/digestcomps The default message skeleton if -digest is
181 given.
182 <mh-dir>/digestcomps The user's -digest skeleton.
183 ^/etc/nmh/mhl.forward The default message filter.
184 <mh-dir>/mhl.forward The user's message filter.
185 ^$HOME/.mh_profile The user's profile.
186
188 Path: To determine the user's nmh directory.
189 Current-Folder: To find the default current folder.
190 Draft-Folder: To specify the default draftfolder.
191 Editor: To override the default editor.
192 Msg-Protect: To set mode when creating a new message
193 (draft).
194 fileproc: Program to refile the message.
195 mhlproc: Program to filter messages being forwarded.
196 whatnowproc: Program to ask the “What now?” questions.
197
199 burst(1), comp(1), mh-draft(5), mh-format(5), mhbuild(1), mhl(1),
200 prompter(1), repl(1), send(1), whatnow(1)
201
202 Proposed Standard for Message Encapsulation (RFC 934)
203
205 +folder The current folder.
206 msgs The current message.
207 -noannotate
208 -nodraftfolder
209 -noformat
210 -inplace
211 -dashstuffing
212 -nomime
213
215 If a folder is given, it will become the current folder. The first
216 message forwarded will become the current message.
217
219 If whatnowproc is whatnow, then forw uses a built-in whatnow, it does
220 not actually run the whatnow program. Hence, if you define your own
221 whatnowproc, don't call it whatnow since forw won't run it.
222
223 When forw is told to annotate the messages it forwards, it doesn't ac‐
224 tually annotate them until the draft is successfully sent. If, from
225 the whatnowproc, you push instead of send, it is possible to confuse
226 forw by re-ordering the file (e.g. by using “folder -pack”) before the
227 message is successfully sent. dist and repl don't have this problem.
228
229
230
231nmh-1.8 2022-12-22 FORW(1)