Remove RCS keywords, since they no longer work after git migration.
[mmh] / man / send.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH SEND %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 send \- send a message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B send
11 .RB [ \-alias
12 .IR aliasfile ]
13 .RB [ \-draft ]
14 .RB [ \-draftfolder
15 .IR +folder ]
16 .RB [ \-draftmessage
17 .IR msg ]
18 .RB [ \-nodraftfolder ]
19 .RB [ \-filter
20 .IR filterfile ]
21 .RB [ \-nofilter ]
22 .RB [ \-format " | " \-noformat ]
23 .RB [ \-forward " | " \-noforward ]
24 .RB [ \-mime " | " \-nomime ]
25 .RB [ \-msgid " | " \-nomsgid ]
26 .RB [ \-push " | " \-nopush ]
27 .RB [ \-split
28 .IR seconds ]
29 .RB [ \-verbose " | " \-noverbose ]
30 .RB [ \-watch " | " \-nowatch ]
31 .RB [ \-server
32 .IR servername ]
33 .RB [ \-port
34 .IR port-name/number ]
35 .RB [ \-sasl ]
36 .RB [ \-saslmech
37 .IR mechanism ]
38 .RB [ \-user
39 .IR username ]
40 .RB [ \-width
41 .IR columns ]
42 .RB [ file
43 \&...] 
44 .RB [ \-version ]
45 .RB [ \-help ]
46 .RB [ \-attach
47 .IR header-field-name ]
48 .RB [ \-attachformat
49 .IR 0 " | " 1 " | " 2 ]
50 .ad
51 .SH DESCRIPTION
52 .B Send
53 will cause each of the specified files to be delivered
54 to each of the destinations in the \*(lqTo:\*(rq, \*(lqcc:\*(rq,
55 \*(lqBcc:\*(rq, \*(lqDcc:\*(rq, and \*(lqFcc:\*(rq fields of the message.  If
56 .B send
57 is re\-distributing a message, as invoked from
58 .BR dist ,
59 then the
60 corresponding \*(lqResent\-xxx\*(rq fields are examined instead.
61 .PP
62 By default,
63 .B send
64 uses the program
65 .B post
66 to do the actual
67 delivery of the messages, although this can be changed by defining the
68 .I postproc
69 profile component.  Most of the features attributed to
70 .B send
71 are actually performed by
72 .BR post .
73
74 .PP
75 If a
76 .I header-field-name
77 is supplied using the
78 .B -attach
79 option, the draft is scanned for a header whose field name matches the
80 supplied
81 .IR header-field-name .
82 The draft is converted to a MIME message if one or more matches are found.
83 This conversion occurs before all other processing.
84 .PP
85 The first part of the MIME message is the draft body if that body contains
86 any non-blank characters.
87 The body of each header field whose name matches the
88 .I header-field-name
89 is interpreted as a file name, and each file named is included as a separate
90 part in the MIME message.
91 .PP
92 For file names with dot suffixes, the context is scanned for a
93 .I mhshow-suffix-
94 entry for that suffix.
95 The content-type for the part is taken from that context entry if a match is
96 found.
97 If no match is found or the file does not have a dot suffix, the content-type
98 is text/plain if the file contains only ASCII characters or application/octet-stream
99 if it contains characters outside of the ASCII range.
100 .PP
101 Each part contains a name attribute that is the last component of the path name.
102 A
103 .I x-unix-mode
104 attribute containing the file mode accompanies each part.
105 Finally, a description attribute is generated by running the
106 .I file
107 command on the file.
108 .PP
109 The
110 .B -attachformat
111 option specifies the MIME header field formats:  a value of
112 .B 0,
113 the default,
114 includes the
115 .I x-unix-mode
116 attribute as noted above.  A value of
117 .B 1
118 suppresses both that and the \*(lqContent-Description\*(rq header, and
119 adds a \*(lqContent-Disposition\*(rq header.  A value of
120 .B 2
121 adds the file
122 .I modification-date
123 parameter to the \*(lqContent-Disposition\*(rq header.  You can
124 specify one value in your profile, and override it for individual
125 messages at the
126 .I whatnow
127 prompt.
128 .PP
129 Here are example message part headers for each of the
130 .B -attachformat
131 values:
132 .PP
133 .nf
134 -attachformat 0:
135 Content-Type: text/plain; name="VERSION"; x-unix-mode="0644";
136         charset="us-ascii"
137 Content-Description: ASCII text 
138
139 -attachformat 1:
140 Content-Type: text/plain; charset="us-ascii"
141 Content-Disposition: attachment; filename="VERSION"
142
143 -attachformat 2:
144 Content-Type: text/plain; charset="us-ascii"
145 Content-Disposition: attachment; filename="VERSION"; modification-date="Mon, 19 Dec 2005 22:39:51 -0600"
146 .fi
147 .PP
148 If
149 .B \-push
150 is specified,
151 .B send
152 will detach itself from the user's
153 terminal and perform its actions in the background.  If
154 .BR push 'd
155 and the draft can't be sent, then an error message will be sent (using
156 the mailproc) back to the user.  If
157 .B \-forward
158 is given, then a copy
159 of the draft will be attached to this failure notice.  Using
160 .B \-push
161 differs from putting
162 .B send
163 in the background because the output is
164 trapped and analyzed by
165 .BR nmh .
166 .PP
167 If
168 .B \-verbose
169 is specified,
170 .B send
171 will indicate the interactions
172 occurring with the transport system, prior to actual delivery.
173 If
174 .B \-watch
175 is specified
176 .B send
177 will monitor the delivery of local
178 and network mail.  Hence, by specifying both switches, a large detail
179 of information can be gathered about each step of the message's entry
180 into the transport system.
181 .PP
182 The
183 .B \-draftfolder
184 .I +folder
185 and
186 .B \-draftmessage
187 .I msg
188 switches invoke
189 the
190 .B nmh
191 draft folder facility.  This is an advanced (and highly
192 useful) feature.  Consult the
193 .BR mh-draft (5)
194 man page for more
195 information.
196 .PP
197 If
198 .B \-split
199 is specified,
200 .B send
201 will split the draft into one
202 or more partial messages prior to sending.  This makes use of the
203 MIME features in
204 .BR nmh .
205 Note however that if
206 .B send
207 is
208 invoked under
209 .BR dist ,
210 then this switch is ignored\0--\0it makes
211 no sense to redistribute a message in this fashion.  Sometimes you want
212 .B send
213 to pause after posting a partial message.  This is usually
214 the case when you are running
215 .B sendmail
216 and expect to generate a
217 lot of partial messages.  The argument to
218 .B \-split
219 tells it how long
220 to pause between postings.
221 .PP
222 .B Send
223 with no
224 .I file
225 argument will query whether the draft
226 is the intended file, whereas
227 .B \-draft
228 will suppress this question.
229 Once the transport system has successfully accepted custody of the
230 message, the file will be renamed with a leading comma, which allows
231 it to be retrieved until the next draft message is sent.  If there are
232 errors in the formatting of the message,
233 .B send
234 will abort with a
235 (hopefully) helpful error message.
236 .PP
237 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
238 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
239 sent to sighted recipients.  The blind recipients will receive an entirely
240 new message with a minimal set of headers.  Included in the body of the
241 message will be a copy of the message sent to the sighted recipients.
242 .PP
243 If a \*(lqDcc:\*(rq field is encountered, its addresses will be used for
244 delivery, and the \*(lqDcc:\*(rq field will be removed from the message.  The
245 blind recipients will receive the same message sent to the sighted
246 recipients. *WARNING* Recipients listed in the \*(lqDcc:\*(rq field receive no
247 explicit indication that they have received a \*(lqblind copy\*(rq.
248 This can cause blind recipients to
249 inadvertently reply to all of the sighted recipients of the
250 original message, revealing that they received a blind copy.
251 On the other hand, since a normal reply to a message sent
252 via a \*(lqBcc:\*(rq field
253 will generate a reply only to the sender of the original message,
254 it takes extra effort in most mailers to reply to the included
255 message, and so would usually only be done deliberately, rather
256 than by accident.
257 .PP
258 If
259 .B \-filter
260 .I filterfile
261 is specified, then this copy is filtered
262 (re\-formatted) by
263 .B mhl
264 prior to being sent to the blind recipients.
265 Alternately, if you specify the
266 .B -mime
267 switch, then
268 .B send
269 will
270 use the MIME rules for encapsulation.
271 .PP
272 Prior to sending the message, the fields \*(lqFrom:\ user@local\*(rq,
273 and \*(lqDate:\ now\*(rq will be appended to the headers in the message.
274 If the environment variable
275 .B $SIGNATURE
276 is set, then its value
277 is used as your personal name when constructing the \*(lqFrom:\*(rq
278 line of the message.  If this environment variable is not set, then
279 .B send
280 will consult the profile entry \*(lqSignature\*(rq for
281 this information.
282 If
283 .B \-msgid
284 is specified, then a \*(lqMessage\-ID:\*(rq field will also
285 be added to the message.
286 .PP
287 If
288 .B send
289 is re\-distributing a message (when invoked by
290 .BR dist ),
291 then \*(lqResent\-\*(rq will be prepended to each of these
292 fields: \*(lqFrom:\*(rq, \*(lqDate:\*(rq, and \*(lqMessage\-ID:\*(rq.
293 If the message already contains a \*(lqFrom:\*(rq field, then a
294 \*(lqSender: user@local\*(rq field will be added as well.  (An already
295 existing \*(lqSender:\*(rq field is an error!)
296 .PP
297 By using the
298 .B \-format
299 switch, each of the entries in the \*(lqTo:\*(rq
300 and \*(lqcc:\*(rq fields will be replaced with \*(lqstandard\*(rq
301 format entries.  This standard format is designed to be usable by all
302 of the message handlers on the various systems around the Internet.
303 If
304 .B \-noformat
305 is given, then headers are output exactly as they appear
306 in the message draft.
307 .PP
308 If an \*(lqFcc:\ folder\*(rq is encountered, the message will be copied
309 to the specified folder for the sender in the format in which it will
310 appear to any non\-Bcc receivers of the message.  That is, it will have
311 the appended fields and field reformatting.  The \*(lqFcc:\*(rq fields
312 will be removed from all outgoing copies of the message.
313 .PP
314 By using the
315 .B \-width
316 .I columns
317 switch, the user can direct
318 .B send
319 as to how long it should make header lines containing addresses.
320 .PP
321 If nmh is using the SMTP MTA, the
322 .B \-server
323 and the
324 .B \-port
325 switches can be used to override the default mail server (defined by the
326 .RI servers
327 entry in
328 .I %etcdir%/mts.conf
329 ).
330 .PP
331 If
332 .B nmh
333 has been compiled with SASL support, the
334 .B \-sasl
335 switch will enable
336 the use of SASL authentication with the SMTP MTA.  Depending on the
337 SASL mechanism used, this may require an additional password prompt from the
338 user (but the
339 .RI \*(lq \&.netrc \*(rq
340 file can be used to store this password).
341 .B \-saslmech
342 switch can be used to select a particular SASL mechanism,
343 and the the
344 .B \-user
345 switch can be used to select a authorization userid
346 to provide to SASL other than the default.
347 .PP
348 If SASL authentication is successful, 
349 .BR nmh
350 will attempt to negotiate a security layer for session encryption.
351 Encrypted data is labelled with `(encrypted)' and `(decrypted)' when
352 viewing the SMTP transaction with the
353 .B \-snoop
354 switch.
355 .PP
356 If
357 .B nmh
358 has been compiled with TLS support, the
359 .B \-tls
360 switch will require the negotiation of TLS support when connecting to the
361 SMTP MTA.  Encrypted data is labelled with `(tls-encrypted)' and
362 `(tls-decrypted)' when viewing the SMTP transction with the
363 .B \-snoop
364 switch.
365 .PP
366 The files specified by the profile entry \*(lqAliasfile:\*(rq and any
367 additional alias files given by the
368 .B \-alias
369 .I aliasfile
370 switch will be
371 read (more than one file, each preceded by
372 .BR \-alias ,
373 can be named).
374 See
375 .BR mh\-alias (5)
376 for more information.
377
378 .SH FILES
379 .fc ^ ~
380 .nf
381 .ta \w'%etcdir%/ExtraBigFileName  'u
382 ^$HOME/\&.mh\(ruprofile~^The user profile
383 .fi
384
385 .SH "PROFILE COMPONENTS"
386 .fc ^ ~
387 .nf
388 .ta 2.4i
389 .ta \w'ExtraBigProfileName  'u
390 ^Path:~^To determine the user's nmh directory
391 ^Draft\-Folder:~^To find the default draft\-folder
392 ^Aliasfile:~^For a default alias file
393 ^Signature:~^To determine the user's mail signature
394 ^mailproc:~^Program to post failure notices
395 ^postproc:~^Program to post the message
396 .fi
397
398 .SH "SEE ALSO"
399 comp(1), dist(1), forw(1), repl(1), mh\-alias(5), post(8)
400
401 .SH DEFAULTS
402 .nf
403 .RB ` file "' defaults to <mh\-dir>/draft"
404 .RB ` \-alias "' defaults to %etcdir%/MailAliases"
405 .RB ` \-nodraftfolder '
406 .RB ` \-nofilter '
407 .RB ` \-format '
408 .RB ` \-forward '
409 .RB ` \-nomime '
410 .RB ` \-nomsgid '
411 .RB ` \-nopush '
412 .RB ` \-noverbose '
413 .RB ` \-nowatch '
414 .RB ` "\-width\ 72" '
415 .RB ` "\-attachformat\ 0" '
416 .fi
417
418 .SH CONTEXT
419 None
420
421 .SH BUGS
422 Under some configurations, it is not possible to monitor the mail delivery
423 transaction;
424 .B \-watch
425 is a no-op on those systems.
426 .PP
427 Using
428 .B \-split
429 .I 0
430 doesn't work correctly.