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