4 .TH SEND %manext1% "October 10, 2016" "%nmhversion%"
20 .RB [ \-nodraftfolder ]
24 .RB [ \-format " | " \-noformat ]
25 .RB [ \-forward " | " \-noforward ]
26 .RB [ \-mime " | " \-nomime ]
27 .RB [ \-msgid " | " \-nomsgid ]
29 .IR localname " | " random ]
30 .RB [ \-push " | " \-nopush ]
33 .RB [ \-verbose " | " \-noverbose ]
34 .RB [ \-watch " | " \-nowatch ]
36 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
42 .IR port-name/number ]
56 .RB [ \-nocertverify ]
64 will cause each of the specified files to be delivered
65 to each of the destinations in the \*(lqTo:\*(rq, \*(lqcc:\*(rq,
66 \*(lqBcc:\*(rq, \*(lqDcc:\*(rq, and \*(lqFcc:\*(rq fields of the message. If
68 is re\-distributing a message, as invoked from
71 corresponding \*(lqResent\-xxx\*(rq fields are examined instead.
78 delivery of the messages, although this can be changed by defining the
80 profile component. Most of the features attributed to
82 are actually performed by
89 for delivery, the message is processed by
91 to perform any necessary MIME encoding of the outgoing message. This
100 directives are not processed by default. See
102 for more information.
105 will scan the message draft for a header named
107 The draft is converted to a MIME message if one or more matches are found.
108 This conversion occurs before all other processing. The
110 man page describes the user interface for managing MIME attachments via
113 The first part of the MIME message is the draft body if that body contains
114 any non-blank characters.
117 header field is interpreted as a file name, and each file named is included as a separate
118 part in the MIME message.
120 Determination of the content MIME type inserted into the Content-Type
121 header for each part depends on how the
123 installation was configured. If a program, such as
129 option, was found that can specify the type of a file as a MIME type
130 string, then that will be used. To determine if your
132 was so configured, run
133 .B mhparam mimetypeproc
134 and see if a non-empty string is displayed.
138 was not configured with a program to specify a file type as a MIME
139 string, then a different method is used to determine the content-type
140 string. For file names with dot suffixes, the profile is scanned for a
142 entry for that suffix.
143 The content-type for the part is taken from that profile entry if a match is
144 found. If a match is not found in the user profile, the mhn.defaults
145 profile is scanned next.
146 If no match is found or the file does not have a dot suffix, the content-type
147 is text/plain if the file contains only ASCII characters or application/octet-stream
148 if it contains characters outside of the ASCII range. See
150 for more details and example syntax.
152 Each attached MIME part contains a
153 \*(lqContent-Description\*(rq header that includes the filename, and
154 adds a \*(lqContent-Disposition\*(rq header.
155 Here is an example of MIME part headers for an attachment:
158 Content-Type: text/plain; name="VERSION"; charset="us-ascii"
159 Content-Description: VERSION
160 Content-Disposition: attachment; filename="VERSION"
165 for explanation of how the Content-Disposition value is selected.
171 will detach itself from the user's
172 terminal and perform its actions in the background. If
174 and the draft can't be sent, then an error message will be sent (using
175 the mailproc) back to the user. If
177 is given, then a copy
178 of the draft will be attached to this failure notice. Using
182 in the background because the output is
183 trapped and analyzed by
190 will indicate the interactions
191 occurring with the transport system, prior to actual delivery.
196 will monitor the delivery of local
197 and network mail. Hence, by specifying both switches, a large detail
198 of information can be gathered about each step of the message's entry
199 into the transport system.
210 draft folder facility. This is an advanced (and highly
211 useful) feature. Consult the
220 will split the draft into one
221 or more partial messages prior to sending. This makes use of the
229 then this switch is ignored\0--\0it makes
230 no sense to redistribute a message in this fashion. Sometimes you want
232 to pause after posting a partial message. This is usually
233 the case when you are running
235 and expect to generate a
236 lot of partial messages. The argument to
239 to pause between postings.
244 argument will query whether the draft
245 is the intended file, whereas
247 will suppress this question.
248 Once the transport system has successfully accepted custody of the
249 message, the file will be renamed with a site-dependent prefix
250 (usually a comma), which allows
251 it to be retrieved until the next draft message is sent. If there are
252 errors in the formatting of the message,
255 (hopefully) helpful error message.
257 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
258 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
259 sent to sighted recipients. The blind recipients will receive an entirely
260 new message with a minimal set of headers. Included in the body of the
261 message will be a copy of the message sent to the sighted recipients.
263 If a \*(lqDcc:\*(rq field is encountered and the
265 mail transport method is not in use, its addresses will be used for
266 delivery, and the \*(lqDcc:\*(rq field will be removed from the message. The
267 blind recipients will receive the same message sent to the sighted
268 recipients. *WARNING* Recipients listed in the \*(lqDcc:\*(rq field receive no
269 explicit indication that they have received a \*(lqblind copy\*(rq.
270 This can cause blind recipients to
271 inadvertently reply to all of the sighted recipients of the
272 original message, revealing that they received a blind copy.
273 On the other hand, since a normal reply to a message sent
274 via a \*(lqBcc:\*(rq field
275 will generate a reply only to the sender of the original message,
276 it takes extra effort in most mailers to reply to the included
277 message, and so would usually only be done deliberately, rather
283 is specified, then this copy is filtered
286 prior to being sent to the blind recipients.
287 Alternately, if you specify the
292 use the MIME rules for encapsulation.
294 Prior to sending the message, the \*(lqDate:\ now\*(rq field will be appended to the headers in the message.
297 is specified, then a \*(lqMessage\-ID:\*(rq field will also
298 be added to the message.
302 switch selects the style used for the part appearing after the @
303 in \*(lqMessage\-ID:\*(rq, \*(lqResent\-Message\-ID:\*(rq, and
304 \*(lqContent\-ID:\*(rq header fields. The two acceptable options are
306 (which is the default),
311 the local hostname is used. With
313 a random sequence of characters is used instead. Note that the
315 switch must be enabled for this switch to have any effect.
319 is re\-distributing a message (when invoked by
321 then \*(lqResent\-\*(rq will be prepended to each of these
322 fields: \*(lqFrom:\*(rq, \*(lqDate:\*(rq, and \*(lqMessage\-ID:\*(rq.
324 A \*(lqFrom:\*(rq field is required for all outgoing messages. Multiple
325 addresses are permitted in the \*(lqFrom:\*(rq field, but a \*(lqSender:\*(rq
326 field is required in this case. Otherwise a \*(lqSender:\*(rq field
329 If a message with multiple \*(lqFrom:\*(rq
332 include a \*(lqSender:\*(rq field but does include an \*(lqEnvelope\-From:\*(rq
333 field, the \*(lqEnvelope\-From:\*(rq field will be used to construct
334 a \*(lqSender:\*(rq field.
336 When using SMTP for mail submission, the envelope\-from used for the SMTP
337 transaction is derived from the \*(lqEnvelope\-From:\*(rq field.
338 If no \*(lqEnvelope\-From:\*(rq field is present, the \*(lqSender:\*(rq
339 field is used. If neither the \*(lqEnvelope\-From:\*(rq nor the
340 \*(lqSender:\*(rq field is present, the \*(lqFrom:\*(rq field is used.
341 When \*(lqEnvelope\-From:\*(rq appears in a message
342 it will be removed from the final outgoing message.
346 switch, each of the entries in the \*(lqTo:\*(rq
347 and \*(lqcc:\*(rq fields will be replaced with \*(lqstandard\*(rq
348 format entries. This standard format is designed to be usable by all
349 of the message handlers on the various systems around the Internet.
352 is given, then headers are output exactly as they appear
353 in the message draft.
355 If an \*(lqFcc:\ folder\*(rq is encountered, the message will be copied
356 to the specified folder for the sender in the format in which it will
357 appear to any non\-Bcc receivers of the message. That is, it will have
358 the appended fields and field reformatting. The \*(lqFcc:\*(rq fields
359 will be removed from all outgoing copies of the message.
364 switch, the user can direct
366 as to how long it should make header lines containing addresses.
368 The mail transport system default is provided in
369 .I %nmhetcdir%/mts.conf
370 but can be overridden here with the
374 If nmh is using as its mail transport system
378 switch can be used to override the default
382 If nmh is using the SMTP MTA, the
386 switches can be used to override the default mail server (defined by the
387 .I %nmhetcdir%/mts.conf
391 switch can be used to view the SMTP transaction. (Beware that the
392 SMTP transaction may contain authentication information either in
393 plaintext or easily decoded base64.) If
394 .B \-sasl \-saslmech xoauth2
395 is used, the HTTP transaction is also shown.
399 has been compiled with SASL support, the
403 switches will enable and disable
404 the use of SASL authentication with the SMTP MTA. Depending on the
405 SASL mechanism used, this may require an additional password prompt from the
408 file can be used to store this password, as described in the
409 mh-profile(5) man page). The
411 switch can be used to select a particular SASL mechanism,
414 switch can be used to select a authorization userid to provide to SASL
415 other than the default. The credentials profile entry in the
416 mh\-profile(5) man page describes the ways to supply a username and
419 If SASL authentication is successful,
421 will attempt to negotiate a security layer for session encryption.
422 Encrypted data is labelled with `(encrypted)' and `(decrypted)' when
423 viewing the SMTP transaction with the
427 man page description of
429 for its other features.
433 has been compiled with OAuth support, the
436 .B \-saslmech xoauth2
437 switches will enable OAuth authentication. The
439 switch must be used, and the
441 must be an email address the user has for the service, which must
442 be specified with the
445 switch. Before using OAuth authentication, the user must authorize nmh by
448 and grant authorization to that account. See the
450 man page for more details.
454 has been compiled with TLS support, the
458 switches will require the negotiation of TLS when
459 connecting to the SMTP MTA. The
461 switch will negotiate TLS as part of the normal SMTP protocol
462 using the STARTTLS command. The
464 will negotiate TLS immediately after the connection has
465 taken place, before any SMTP commands are sent or received. Encrypted data
466 is labelled with `(tls-encrypted)' and
467 `(tls-decrypted)' when viewing the SMTP transaction with the
471 man page description of
473 for its other features.
476 switch will disable all attempts to negotiate TLS.
478 If port 465 is specified and none of the TLS switches were enabled,
480 will be implied if TLS support was compiled in. Though port 465 for
481 SMTPS (SMTP over SSL) was deregistered by IANA in 1998, it is still
482 used for that service.
484 When using TLS the default is to verify the remote certificate and SubjectName
485 against the local trusted certificate store. This can be controlled by
490 switches. See your OpenSSL documentation for more information on certificate
493 The files specified by the profile entry \*(lqAliasfile:\*(rq and any
494 additional alias files given by the
498 read (more than one file, each preceded by
503 for more information.
504 .SS Selection based on sender address: sendfrom
507 profile components can be used to select a mail server address, mail server
508 port, or any other switch that can be supplied to
510 It works by first looking at the sender address and domain name in the
511 message draft, as described below.
512 It then looks for a corresponding profile entry, which contains the
515 To enable, add profile entries of the form:
518 .RI sendfrom- "address/domain name" : " post switches"
521 The email address is extracted from the Envelope-From: header, if not blank,
522 the Sender: header, or the From: header line in the message draft.
523 Multiple profile entries, with different email addresses or domain names, are
525 This allows different switches to
527 such as -user, to be associated with different email addresses.
528 If a domain name is used, it matches all users in that domain.
530 Here is an example profile entry using OAuth for an account hosted by gmail:
534 sendfrom-gmail_address@example.com: -sasl -saslmech xoauth2
536 -authservice gmail -tls -server smtp.gmail.com
537 -user gmail_login@example.com
542 (Indentation indicates a continued line, as supported in MH profiles.)
543 The username need not be the same as the sender address, which was extracted
544 from the appropriate header line as noted above.
546 Here are example profile entries that use an nmh credentials file:
550 credentials: file:nmhcreds
551 sendfrom-sendgrid_address@example.com: -sasl -tls
553 -server smtp.sendgrid.net
555 sendfrom-outbound.att.net: -sasl -initialtls
557 -server outbound.att.net -port 465
559 sendfrom-fastmail.com: -initialtls -sasl -saslmech LOGIN
561 -server smtps-proxy.messagingengine.com -port 80
566 where nmhcreds is in the user's nmh directory (from the Path profile component)
571 machine smtp.sendgrid.net
573 login sendgrid_login@example.com
576 machine outbound.att.net
578 login att_login@example.com
581 machine smtps-proxy.messagingengine.com
583 login fastmail_login@example.com
589 For more information on authentication to mail servers, see the
591 man page for OAuth services, and
593 man page for login credentials.
598 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
599 ^$HOME/\&.mh\(ruprofile~^The user profile
601 .SH "PROFILE COMPONENTS"
605 .ta \w'ExtraBigProfileName 'u
606 ^Path:~^To determine the user's nmh directory
607 ^Draft\-Folder:~^To find the default draft\-folder
608 ^Aliasfile:~^For a default alias file
609 ^Signature:~^To determine the user's mail signature
610 ^mailproc:~^Program to post failure notices
611 ^postproc:~^Program to post the message
612 ^sendfrom-address:~^Switches to post for sender address
613 ^sendfrom-domain:~^Switches to post for sender domain name
631 .RB ` file "' defaults to <mh\-dir>/draft"
632 .RB ` \-alias "' defaults to %nmhetcdir%/MailAliases"
633 .RB ` \-nodraftfolder '
639 .RB ` "\-messageid\ localname" '
643 .RB ` "\-width\ 72" '
649 Under some configurations, it is not possible to monitor the mail delivery
652 is a no-op on those systems.
657 doesn't work correctly.