# post(8) - man - phpMan

[POST(8mh)](https://www.chedong.com/phpMan.php/man/POST/8mh/markdown)                                                                                  [POST(8mh)](https://www.chedong.com/phpMan.php/man/POST/8mh/markdown)



## NAME
       post - deliver an nmh message

## SYNOPSIS
       **/usr/lib/mh/post** [**-help**] [**-version**] [**-alias** _aliasfile_] [**-filter** _filterfile_] [**-nofilter**]
            [**-format** | **-noformat**] [**-mime** | **-nomime**] [**-msgid** | **-nomsgid**] [**-messageid** _localname_ | _ran__‐
            _dom_] [**-verbose** | **-noverbose**] [**-watch** | **-nowatch**] [**-width** _columns_] [**-mts** _smtp_ | _send__‐
            _mail/smtp_ | _sendmail/pipe_] [**-sendmail** _program_] [**-server** _servername_] [**-port** _portname/num__‐
            _ber_] [**-sasl**] [**-nosasl**] [**-saslmech** _mechanism_] [**-user** _username_] [**-tls**] [**-initialtls**]
            [**-notls**] _file_

## DESCRIPTION
       **post** is the default program called by **send** to deliver the message in _file_ to local and remote
       users.   In fact, most of the features attributed to **send** in its manual page are performed by
       **post**, with **send** acting as a relatively simple preprocessor.  Thus, it is  **post**  which  parses
       the various header fields, appends a “Date:” line, and interacts with the mail transport sys‐
       tem.  **post** will not normally be called directly by the user, but can be replaced by the  user
       with  a  _postproc_  profile  component that will have _file_ as its final argument.  See _mh-pro__‐
       [_file_(5)](https://www.chedong.com/phpMan.php/man/file/5/markdown) for more information on postproc.

       **post** searches the “To:”, “cc:”, “Bcc:”, “Fcc:”, and “Resent-xxx:” header lines of the  speci‐
       fied message for destination addresses, checks these addresses for validity, and formats them
       so as to conform to ARPAnet Internet Message Format protocol, unless the  **-noformat**  flag  is
       set.   This  will  normally  cause “@_local-site_” to be appended to each local destination ad‐
       dress, as well as any local return addresses.  The **-width** _columns_ switch can be used to indi‐
       cate the preferred length of the header components that contain addresses.

       If  a  “Bcc:”  field  is encountered, its addresses will be used for delivery, and the “Bcc:”
       field will be removed from the message sent to sighted recipients. The blind recipients  will
       receive  an  entirely new message with a minimal set of headers. The body of this new message
       will contain a copy of the message sent to the sighted recipients, either marked up with  the
       indicator text "Blind-Carbon-Copy" or encapsulated as a MIME digest.

       If **-filter** _filterfile_ is specified, then this copy is filtered (re-formatted) by **mhl** prior to
       being sent to the blind recipients.  Alternately, if the **-mime** switch  is  given,  then  **post**
       will use the MIME rules for encapsulation.

       If  a  “Dcc:” field is encountered and the **sendmail/pipe** mail transport method is not in use,
       its addresses will be used for delivery, and the “Dcc:” field will be removed from  the  mes‐
       sage.  The  blind recipients will receive exactly the same message as the sighted recipients.
       *WARNING* Recipients listed in the “Dcc:” field receive no explicit indication that they have
       received  a  “blind  copy”.  This can cause blind recipients to inadvertently reply to all of
       the sighted recipients of the original message, revealing that they received  a  blind  copy.
       On  the other hand, since a normal reply to a message sent via a “Bcc:” field will generate a
       reply only to the sender of the original message, it takes extra effort in  most  mailers  to
       reply to the included message, and so would usually only be done deliberately, rather than by
       accident.

       **post** rejects all messages that contain a “Dcc:” field if  the  **sendmail/pipe**  mail  transport
       method is used.

       The **-alias** _aliasfile_ switch can be used to specify a file that post should read aliases from.
       More than one file can be specified, with each being preceded by **-alias**.  In any  event,  the
       primary alias file is read first.

       The  **-msgid**  switch  indicates  that  a “Message-ID:” or “Resent-Message-ID:” field should be
       added to the header.

       The **-messageid** switch selects the style used for the part appearing  after  the  @  in  “Mes‐
       sage-ID:”, “Resent-Message-ID:”, and “Content-ID:” header fields.  The two acceptable options
       are **localname** (which is the default), and **random**.  With  **localname**,  the  local  hostname  is
       used.   With  **random**,  a random sequence of characters is used instead.  Note that the **-msgid**
       switch must be enabled for this switch to have any effect.

       The **-verbose** switch indicates that the user should be informed of  each  step  of  the  post‐
       ing/filing process.

       The **-watch** switch indicates that the user would like to watch the transport system's handling
       of the message (e.g., local and “fast” delivery).

       Under normal circumstances, **post** uses the “From:” line in the message draft as  the  identity
       of  the  originating  mailbox.  A “From:” line is required in all message drafts.  By default
       the message composition utilities such as **comp**, **repl** and **mhmail** will  automatically  place  a
       “From:”  line  in  the message draft.  There are two ways to override this behavior, however.
       Note that they apply equally to “Resent-From:” lines in messages sent with **dist**.

       The first way is to supply a “Sender:” line.  The value of this field will  be  used  as  the
       originating  mailbox  identity  when submitting the message to the mail transport system.  If
       multiple addresses are given in the “From:” line, a “Sender:” line is **required**.  If an “Enve‐
       lope-From:”  line  is  supplied  when  multiple  addresses  are  given in the “From:” line, a
       “Sender:” header will be generated using the value of the “Envelope-From:” line, **if** the  “En‐
       velope-From:” line is not blank.

       The second way is to supply a “Envelope-From:” line.  The value of this field will be used as
       the originating mailbox identity when submitting the message to the  mail  transport  system.
       This  will  override  both the value of the “From:” line and a “Sender:” line (if one is sup‐
       plied).  The “Envelope-From:” line is allowed to have a blank value; if the value  is  blank,
       then  the mail transport system will be instructed to not send any bounces in response to the
       message.  Not all mail transport systems support this feature.

       The mail transport system default is defined in _/etc/nmh/mts.conf_ but can be overridden  here
       with the **-mts** switch.

       If nmh is using **sendmail/pipe**, as its mail transport system, the **-sendmail** switch can be used
       to override the default **sendmail** program.

       If nmh is using the SMTP MTA, the **-server** and **-port** switches can be used to override the  de‐
       fault mail server and port.  The default server is set with _servers_ in _/etc/nmh/mts.conf_, and
       the default port is _submission_, 587.

       If **nmh** has been compiled with SASL support, the **-sasl** and **-nosasl** switches  will  enable  and
       disable  the  use  of SASL authentication with the SMTP MTA.  Depending on the SASL mechanism
       used, this may require an additional password prompt from the user (but the _netrc_ file can be
       used to store this password, as described in [_mh-profile_(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown).  The **-saslmech** switch can be used
       to select a particular SASL mechanism, and the **-user** switch can be used to select  an  autho‐
       rization userid to provide to SASL, other than the default.  The credentials profile entry in
       [_mh-profile_(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown) describes the ways to supply a username and password.

       If SASL authentication is successful, **nmh** will attempt to negotiate a security layer for ses‐
       sion  encryption.   Encrypted data is labelled with `(sasl-encrypted)' and `(sasl-decrypted)'
       when viewing the SMTP transaction with the **-snoop** switch.   Base64-encoded  data  is  wrapped
       with  `b64<>'.   (Beware that the SMTP transaction may contain authentication information ei‐
       ther in plaintext or easily decoded base64.)

       If **nmh** has been compiled with TLS support, the **-tls** and **-initialtls** switches will require the
       negotiation  of  TLS  when connecting to the SMTP MTA.  The **-tls** switch will negotiate TLS as
       part of the normal SMTP protocol using the STARTTLS command.  The **-initialtls** will  negotiate
       TLS  immediately  after  the connection has taken place, before any SMTP commands are sent or
       received.  Encrypted data is labelled with `(tls-encrypted)' and `(tls-decrypted)' when view‐
       ing  the  SMTP  transaction  with  the  **-snoop**  switch.   Base64-encoded data is wrapped with
       `b64<>'.  (Beware that the SMTP transaction may contain authentication information either  in
       plaintext  or easily decoded base64.)  The **-notls** switch will disable all attempts to negoti‐
       ate TLS.

       If port 465 is specified and none of the TLS switches were enabled, **-initialtls** will  be  im‐
       plied if TLS support was compiled in.  Though port 465 for SMTPS (SMTP over SSL) was deregis‐
       tered by IANA in 1998, it is still used for that service.

       **post** filters out header lines with names beginning with “Nmh-” (case  insensitive)  from  the
       message draft.  Those lines are reserved for internal **nmh** use.

## FILES
       /etc/nmh/mts.conf          nmh mts configuration file
       /etc/nmh/MailAliases       global nmh alias file
       /usr/bin/mh/refile         Program to process Fcc:s
       /usr/lib/mh/mhl            Program to process Bcc:s

## PROFILE COMPONENTS
       **post** does _not_ consult the user's _.mh_profile_

## SEE ALSO
       [_mhmail_(1)](https://www.chedong.com/phpMan.php/man/mhmail/1/markdown), [_send_(1)](https://www.chedong.com/phpMan.php/man/send/1/markdown), [_mh-mail_(5)](https://www.chedong.com/phpMan.php/man/mh-mail/5/markdown), [_mh-alias_(5)](https://www.chedong.com/phpMan.php/man/mh-alias/5/markdown), [_mh-profile_(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown), [_mh-tailor_(5)](https://www.chedong.com/phpMan.php/man/mh-tailor/5/markdown)

       _Standard_ _for_ _the_ _Format_ _of_ _ARPA_ _Internet_ _Text_ _Messages_ (RFC 822)

## DEFAULTS
       `**-alias**' defaults to /etc/nmh/MailAliases
       `**-format**'
       `**-nomime**'
       `**-nomsgid**'
       `**-messageid** **localname**'
       `**-noverbose**'
       `**-nowatch**'
       `**-width** **72**'
       `**-nofilter**'

## CONTEXT
       None

## BUGS
       “Reply-To:” fields are allowed to have groups in them according to the RFC 822 specification,
       but **post** won't let you use them.



nmh-1.7.1                                    2016-10-17                                    [POST(8mh)](https://www.chedong.com/phpMan.php/man/POST/8mh/markdown)
