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