4 .TH SEND %manext1% "August 14, 2016" "%nmhversion%"
18 .RB [ \-nodraftfolder ]
22 .RB [ \-format " | " \-noformat ]
23 .RB [ \-forward " | " \-noforward ]
24 .RB [ \-mime " | " \-nomime ]
25 .RB [ \-msgid " | " \-nomsgid ]
27 .IR localname " | " random ]
28 .RB [ \-push " | " \-nopush ]
31 .RB [ \-verbose " | " \-noverbose ]
32 .RB [ \-watch " | " \-nowatch ]
34 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
40 .IR port-name/number ]
62 will cause each of the specified files to be delivered
63 to each of the destinations in the \*(lqTo:\*(rq, \*(lqcc:\*(rq,
64 \*(lqBcc:\*(rq, \*(lqDcc:\*(rq, and \*(lqFcc:\*(rq fields of the message. If
66 is re\-distributing a message, as invoked from
69 corresponding \*(lqResent\-xxx\*(rq fields are examined instead.
76 delivery of the messages, although this can be changed by defining the
78 profile component. Most of the features attributed to
80 are actually performed by
87 for delivery, the message is processed by
89 to perform any necessary MIME encoding of the outgoing message. This
98 directives are not processed by default. See
100 for more information.
103 will scan the message draft for a header named
105 The draft is converted to a MIME message if one or more matches are found.
106 This conversion occurs before all other processing. The
108 man page describes the user interface for managing MIME attachments via
111 The first part of the MIME message is the draft body if that body contains
112 any non-blank characters.
115 header field is interpreted as a file name, and each file named is included as a separate
116 part in the MIME message.
118 Determination of the content MIME type inserted into the Content-Type
119 header for each part depends on how the
121 installation was configured. If a program, such as
127 option, was found that can specify the type of a file as a MIME type
128 string, then that will be used. To determine if your
130 was so configured, run
131 .B mhparam mimetypeproc
132 and see if a non-empty string is displayed.
136 was not configured with a program to specify a file type as a MIME
137 string, then a different method is used to determine the content-type
138 string. For file names with dot suffixes, the profile is scanned for a
140 entry for that suffix.
141 The content-type for the part is taken from that profile entry if a match is
142 found. If a match is not found in the user profile, the mhn.defaults
143 profile is scanned next.
144 If no match is found or the file does not have a dot suffix, the content-type
145 is text/plain if the file contains only ASCII characters or application/octet-stream
146 if it contains characters outside of the ASCII range. See
148 for more details and example syntax.
150 Each attached MIME part contains a
151 \*(lqContent-Description\*(rq header that includes the filename, and
152 adds a \*(lqContent-Disposition\*(rq header.
153 Here is an example of MIME part headers for an attachment:
156 Content-Type: text/plain; name="VERSION"; charset="us-ascii"
157 Content-Description: VERSION
158 Content-Disposition: attachment; filename="VERSION"
163 for explanation of how the Content-Disposition value is selected.
169 will detach itself from the user's
170 terminal and perform its actions in the background. If
172 and the draft can't be sent, then an error message will be sent (using
173 the mailproc) back to the user. If
175 is given, then a copy
176 of the draft will be attached to this failure notice. Using
180 in the background because the output is
181 trapped and analyzed by
188 will indicate the interactions
189 occurring with the transport system, prior to actual delivery.
194 will monitor the delivery of local
195 and network mail. Hence, by specifying both switches, a large detail
196 of information can be gathered about each step of the message's entry
197 into the transport system.
208 draft folder facility. This is an advanced (and highly
209 useful) feature. Consult the
218 will split the draft into one
219 or more partial messages prior to sending. This makes use of the
227 then this switch is ignored\0--\0it makes
228 no sense to redistribute a message in this fashion. Sometimes you want
230 to pause after posting a partial message. This is usually
231 the case when you are running
233 and expect to generate a
234 lot of partial messages. The argument to
237 to pause between postings.
242 argument will query whether the draft
243 is the intended file, whereas
245 will suppress this question.
246 Once the transport system has successfully accepted custody of the
247 message, the file will be renamed with a site-dependent prefix
248 (usually a comma), which allows
249 it to be retrieved until the next draft message is sent. If there are
250 errors in the formatting of the message,
253 (hopefully) helpful error message.
255 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
256 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
257 sent to sighted recipients. The blind recipients will receive an entirely
258 new message with a minimal set of headers. Included in the body of the
259 message will be a copy of the message sent to the sighted recipients.
261 If a \*(lqDcc:\*(rq field is encountered and the
263 mail transport method is not in use, its addresses will be used for
264 delivery, and the \*(lqDcc:\*(rq field will be removed from the message. The
265 blind recipients will receive the same message sent to the sighted
266 recipients. *WARNING* Recipients listed in the \*(lqDcc:\*(rq field receive no
267 explicit indication that they have received a \*(lqblind copy\*(rq.
268 This can cause blind recipients to
269 inadvertently reply to all of the sighted recipients of the
270 original message, revealing that they received a blind copy.
271 On the other hand, since a normal reply to a message sent
272 via a \*(lqBcc:\*(rq field
273 will generate a reply only to the sender of the original message,
274 it takes extra effort in most mailers to reply to the included
275 message, and so would usually only be done deliberately, rather
281 is specified, then this copy is filtered
284 prior to being sent to the blind recipients.
285 Alternately, if you specify the
290 use the MIME rules for encapsulation.
292 Prior to sending the message, the \*(lqDate:\ now\*(rq field will be appended to the headers in the message.
295 is specified, then a \*(lqMessage\-ID:\*(rq field will also
296 be added to the message.
300 switch selects the style used for the part appearing after the @
301 in \*(lqMessage\-ID:\*(rq, \*(lqResent\-Message\-ID:\*(rq, and
302 \*(lqContent\-ID:\*(rq header fields. The two acceptable options are
304 (which is the default),
309 the local hostname is used. With
311 a random sequence of characters is used instead. Note that the
313 switch must be enabled for this switch to have any effect.
317 is re\-distributing a message (when invoked by
319 then \*(lqResent\-\*(rq will be prepended to each of these
320 fields: \*(lqFrom:\*(rq, \*(lqDate:\*(rq, and \*(lqMessage\-ID:\*(rq.
322 A \*(lqFrom:\*(rq field is required for all outgoing messages. Multiple
323 addresses are permitted in the \*(lqFrom:\*(rq field, but a \*(lqSender:\*(rq
324 field is required in this case. Otherwise a \*(lqSender:\*(rq field
327 If a message with multiple \*(lqFrom:\*(rq
330 include a \*(lqSender:\*(rq field but does include an \*(lqEnvelope\-From:\*(rq
331 field, the \*(lqEnvelope\-From:\*(rq field will be used to construct
332 a \*(lqSender:\*(rq field.
334 When using SMTP for mail submission, the envelope\-from used for the SMTP
335 transaction is derived from the \*(lqEnvelope\-From:\*(rq field.
336 If no \*(lqEnvelope\-From:\*(rq field is present, the \*(lqSender:\*(rq
337 field is used. If neither the \*(lqEnvelope\-From:\*(rq nor the
338 \*(lqSender:\*(rq field is present, the \*(lqFrom:\*(rq field is used.
339 When \*(lqEnvelope\-From:\*(rq appears in a message
340 it will be removed from the final outgoing message.
344 switch, each of the entries in the \*(lqTo:\*(rq
345 and \*(lqcc:\*(rq fields will be replaced with \*(lqstandard\*(rq
346 format entries. This standard format is designed to be usable by all
347 of the message handlers on the various systems around the Internet.
350 is given, then headers are output exactly as they appear
351 in the message draft.
353 If an \*(lqFcc:\ folder\*(rq is encountered, the message will be copied
354 to the specified folder for the sender in the format in which it will
355 appear to any non\-Bcc receivers of the message. That is, it will have
356 the appended fields and field reformatting. The \*(lqFcc:\*(rq fields
357 will be removed from all outgoing copies of the message.
362 switch, the user can direct
364 as to how long it should make header lines containing addresses.
366 The mail transport system default is provided in
367 .I %nmhetcdir%/mts.conf
368 but can be overriiden here with the
372 If nmh is using as its mail transport system
376 switch can be used to override the default
380 If nmh is using the SMTP MTA, the
384 switches can be used to override the default mail server (defined by the
385 .I %nmhetcdir%/mts.conf
389 switch can be used to view the SMTP transaction. (Beware that the
390 SMTP transaction may contain authentication information either in
391 plaintext or easily decoded base64.)
395 has been compiled with SASL support, the
399 switches will enable and disable
400 the use of SASL authentication with the SMTP MTA. Depending on the
401 SASL mechanism used, this may require an additional password prompt from the
404 file can be used to store this password, as described in the
405 mh-profile(5) man page). The
407 switch can be used to select a particular SASL mechanism,
410 switch can be used to select a authorization userid to provide to SASL
411 other than the default. The credentials profile entry in the
412 mh\-profile(5) man page describes the ways to supply a username and
415 If SASL authentication is successful,
417 will attempt to negotiate a security layer for session encryption.
418 Encrypted data is labelled with `(encrypted)' and `(decrypted)' when
419 viewing the SMTP transaction with the
423 man page description of
425 for its other features.
428 switch can be used to select the maximum value of the Security Strength Factor.
429 This is an integer value and the exact meaning of this value depends on the
430 underlying SASL mechanism. A value of 0 disables encryption.
434 has been compiled with TLS support, the
438 switches will require the negotiation of TLS when
439 connecting to the SMTP MTA. The
441 switch will negotiate TLS as part of the normal SMTP protocol
442 using the STARTTLS command. The
444 will negotiate TLS immediately after the connection has
445 taken place, before any SMTP commands are sent or received. Encrypted data
446 is labelled with `(tls-encrypted)' and
447 `(tls-decrypted)' when viewing the SMTP transction with the
451 man page description of
453 for its other features.
456 switch will disable all attempts to negotiate TLS.
458 If port 465 is specified and none of the TLS switches were enabled,
460 will be implied if TLS support was compiled in. Though port 465 for
461 SMTPS (SMTP over SSL) was deregistered by IANA in 1998, it is still
462 used for that service.
464 The files specified by the profile entry \*(lqAliasfile:\*(rq and any
465 additional alias files given by the
469 read (more than one file, each preceded by
474 for more information.
475 .SS Selection based on sender address: sendfrom
478 profile components can be used to select a mail server address, mail server
479 port, or any other switch that can be supplied to
481 It works by first looking at the sender address and domain name in the
482 message draft, as described below.
483 It then looks for a corresponding profile entry, which contains the
486 To enable, add profile entries of the form:
489 .RI sendfrom- "address/domain name" : " post switches"
492 The email address is extracted from the Envelope-From: header, if not blank,
493 the Sender: header, or the From: header line in the message draft.
494 Multiple profile entries, with different email addresses or domain names, are
496 This allows different switches to
498 such as -user, to be associated with different email addresses.
499 If a domain name is used, it matches all users in that domain.
501 Here is an example profile entry using OAuth for an account hosted by gmail:
505 sendfrom-gmail_address@example.com: -saslmech xoauth2
507 -authservice gmail -tls -server smtp.gmail.com
508 -user gmail_login@example.com
513 (Indentation indicates a continued line, as supported in MH profiles.)
514 The username need not be the same as the sender address, which was extracted
515 from the appropriate header line as noted above.
517 Here are example profile entries that use an nmh credentials file:
521 credentials: file:nmhcreds
522 sendfrom-sendgrid_address@example.com: -sasl -tls
524 -server smtp.sendgrid.net
526 sendfrom-outbound.att.net: -sasl -initialtls
528 -server outbound.att.net -port 465
530 sendfrom-fastmail.com: -initialtls -sasl -saslmech LOGIN
532 -server smtps-proxy.messagingengine.com -port 80
537 where nmhcreds is in the user's nmh directory (from the Path profile component)
542 machine smtp.sendgrid.net
544 login sendgrid_login@example.com
547 machine outbound.att.net
549 login att_login@example.com
552 machine smtps-proxy.messagingengine.com
554 login fastmail_login@example.com
560 For more information on authentication to mail servers, see the
562 man page for OAuth services, and
564 man page for login credentials.
569 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
570 ^$HOME/\&.mh\(ruprofile~^The user profile
572 .SH "PROFILE COMPONENTS"
576 .ta \w'ExtraBigProfileName 'u
577 ^Path:~^To determine the user's nmh directory
578 ^Draft\-Folder:~^To find the default draft\-folder
579 ^Aliasfile:~^For a default alias file
580 ^Signature:~^To determine the user's mail signature
581 ^mailproc:~^Program to post failure notices
582 ^postproc:~^Program to post the message
583 ^sendfrom-address:~^Switches to post for sender address
584 ^sendfrom-domain:~^Switches to post for sender domain name
601 .RB ` file "' defaults to <mh\-dir>/draft"
602 .RB ` \-alias "' defaults to %nmhetcdir%/MailAliases"
603 .RB ` \-nodraftfolder '
609 .RB ` "\-messageid\ localname" '
613 .RB ` "\-width\ 72" '
618 Under some configurations, it is not possible to monitor the mail delivery
621 is a no-op on those systems.
626 doesn't work correctly.