Added -messageid switch to send(1) and post(8). This allows selection
[mmh] / man / post.man
index 23841f7..bd048c0 100644 (file)
 .\"
 .\" %nmhwarning%
 .\"
 .\" %nmhwarning%
-.\" $Id$
 .\"
 .\"
-.\" include the -mh macro file
-.so %etcdir%/tmac.h
-.\"
-.TH POST %manext8% MH.6.8 [%nmhversion%]
+.TH POST %manext8% "%nmhdate%" MH.6.8 [%nmhversion%]
 .SH NAME
 post \- deliver a message
 .SH SYNOPSIS
 .SH NAME
 post \- deliver a message
 .SH SYNOPSIS
-.in +.5i
-.ti -.5i
-%libdir%/post 
-\%[\-alias\ aliasfile]
-.br
-\%[\-filter\ filterfile] \%[\-nofilter]
-\%[\-format] \%[\-noformat]
-.br
-\%[\-mime] \%[\-nomime]
-\%[\-msgid] \%[\-nomsgid]
-\%[\-verbose]
-.br
-\%[\-noverbose]
-\%[\-watch] \%[\-nowatch]
-\%[\-width\ columns]
-\%[\-sasl] \%[\-saslmech\ mechanism] \%[\-user\ username]
-.br
-file
-\%[\-version]
-\%[\-help]
-.in -.5i
+.HP 5
+.na
+.B %libdir%/post 
+.RB [ \-alias
+.IR aliasfile ]
+.RB [ \-filter
+.IR filterfile ]
+.RB [ \-nofilter ]
+.RB [ \-format " | " \-noformat ]
+.RB [ \-mime " | " \-nomime ]
+.RB [ \-msgid " | " \-nomsgid ]
+.RB [ \-messageid
+.IR localname " | " random ]
+.RB [ \-verbose " | " \-noverbose ]
+.RB [ \-watch " | " \-nowatch ]
+.RB [ \-width
+.IR columns ]
+.RB [ \-mts
+.IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
+.RB [ \-server
+.IR servername ]
+.RB [ \-port
+.IR portname/number ]
+.RB [ \-sasl ]
+.RB [ \-nosasl ]
+.RB [ \-saslmaxssf
+.IR ssf ]
+.RB [ \-saslmech
+.IR mechanism ]
+.RB [ \-user
+.IR username ]
+.RB [ \-tls ]
+.RB [ \-notls ]
+.I file
+.RB [ \-version ]
+.RB [ \-help ]
+.ad
 .SH DESCRIPTION
 .SH DESCRIPTION
-\fIPost\fR is the default program called by \fIsend\fR\0(1) to deliver
-the message in \fIfile\fR to local and remote users.  In fact, most of
-the features attributed to \fIsend\fR in its manual page are performed by
-\fIpost\fR, with \fIsend\fR acting as a relatively simple preprocessor.
-Thus, it is \fIpost\fR which parses the various header fields, appends
-From: and Date: lines, and interacts with the mail transport system.
-\fIPost\fR will not normally be called directly by the user.
-
-\fIPost\fR searches the \*(lqTo:\*(rq, \*(lqcc:\*(rq, \*(lqBcc:\*(rq,
+.B Post
+is the default program called by
+.B send
+to deliver
+the message in
+.I file
+to local and remote users.  In fact, most of
+the features attributed to
+.B send
+in its manual page are performed by
+.BR post ,
+with
+.B send
+acting as a relatively simple preprocessor.
+Thus, it is
+.B post
+which parses the various header fields, appends a
+\*(lqDate:\*(rq line, and interacts with the mail transport system.
+.B Post
+will not normally be called directly by the user.
+.PP
+.B Post
+searches the \*(lqTo:\*(rq, \*(lqcc:\*(rq, \*(lqBcc:\*(rq,
 \*(lqFcc:\*(rq, and \*(lqResent\-xxx:\*(rq header lines of the specified
 message for destination addresses, checks these addresses for validity,
 and formats them so as to conform to ARPAnet Internet Message Format
 \*(lqFcc:\*(rq, and \*(lqResent\-xxx:\*(rq header lines of the specified
 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
+protocol, unless the
+.B \-noformat
+flag is set.  This will normally cause
 \*(lq@\fIlocal\-site\fR\*(rq to be appended to each local destination
 \*(lq@\fIlocal\-site\fR\*(rq to be appended to each local destination
-address, as well as any local return addresses.  The `\-width\ columns'
+address, as well as any local return addresses.  The
+.B \-width
+.I columns
 switch can be used to indicate the preferred length of the header
 components that contain addresses.
 switch can be used to indicate the preferred length of the header
 components that contain addresses.
-
+.PP
 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
 delivery, and the \*(lqBcc:\*(rq 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.  Included in the body of the
 message will be a copy of the message sent to the sighted recipients.
 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
 delivery, and the \*(lqBcc:\*(rq 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.  Included in the body of the
 message will be a copy of the message sent to the sighted recipients.
-If `\-filter\ filterfile' is specified, then this copy is filtered
-(re\-formatted) by \fImhl\fR prior to being sent to the blind recipients.
-Alternately, if the `\-mime' switch is given, then \fIpost\fR will use
+If
+.B \-filter
+.I filterfile
+is specified, then this copy is filtered
+(re\-formatted) by
+.B mhl
+prior to being sent to the blind recipients.
+Alternately, if the
+.B \-mime
+switch is given, then
+.B post
+will use
 the MIME rules for encapsulation.
 the MIME rules for encapsulation.
-
-The `\-alias\ aliasfile' switch can be used to specify a file that post
+.PP
+The
+.B \-alias
+.I aliasfile
+switch can be used to specify a file that post
 should take aliases from.  More than one file can be specified, each
 should take aliases from.  More than one file can be specified, each
-being preceded with `\-alias'.  In any event, the primary alias file is
+being preceded with
+.BR \-alias .
+In any event, the primary alias file is
 read first.
 read first.
-
-The `\-msgid' switch indicates that a \*(lqMessage\-ID:\*(rq or
+.PP
+The
+.B \-msgid
+switch indicates that a \*(lqMessage\-ID:\*(rq or
 \*(lqResent\-Message\-ID:\*(rq field should be added to the header.
 \*(lqResent\-Message\-ID:\*(rq field should be added to the header.
-
-The `\-verbose' switch indicates that the user should be informed of
+.PP
+The
+.B \-messageid
+switch selects the style used for the part appearing after the @
+in \*(lqMessage\-ID:\*(rq, \*(lqResent\-Message\-ID:\*(rq, and
+\*(lqContent\-ID:\*(rq header fields.  The two acceptable options are
+.B localname
+(which is the default),
+and
+.BR random .
+With
+.BR localname ,
+the local hostname is used.  With
+.BR random ,
+a random sequence of characters is used instead.  Note that the
+.B \-msgid
+switch must be enabled for this switch to have any effect.
+.PP
+The
+.B \-verbose
+switch indicates that the user should be informed of
 each step of the posting/filing process.
 each step of the posting/filing process.
-
-The `\-watch' switch indicates that the user would like to watch the
+.PP
+The
+.B \-watch
+switch indicates that the user would like to watch the
 transport system's handling of the message (e.g., local and \*(lqfast\*(rq
 delivery).
 transport system's handling of the message (e.g., local and \*(lqfast\*(rq
 delivery).
-
-Under normal circumstances, \fIpost\fR constructs the "From:" line of the
-message from the user's login name, the full name from the GECOS field of the
-passwd file, and the fully\-qualified name of the local machine (or the value of
-"localname" in mts.conf, if set).  An example is "From: Dan Harkless
-<dan@machine.company.com>".  There are four ways to override these values,
-however.  Note that they apply equally to "Resent\-From:" lines in messages sent
-with \fIdist\fR.
-
-The first way is GECOS\-based username masquerading.  If the "masquerade:" line
-in mts.conf contains "mmailid", this processing is activated.  If a user's GECOS
-field in the passwd file is of the form "Full Name <fakename>" then "fakename"
-will be used in place of the real username.  For instance, a GECOS field of "Dan
-Harkless <Dan.Harkless>" would result in "From: Dan Harkless
-<Dan.Harkless@machine.company.com>".  Naturally if you were doing something like
-this you'd want to set up an MTA alias (e.g. in /etc/aliases) from, for
-instance, "Dan.Harkless" to "dan".
-
-The second way to override default construction of "From:" is to set the
-\fB$SIGNATURE\fR environment variable.  This variable overrides the full name
-from the GECOS field, even if GECOS\-based masquerading is being done.  This
-processing is always active, and does not need to be enabled from mts.conf.
-
-The third way is controlled by the "user_extension" value of "masquerade:" line
-of mts.conf.  When that's turned on, setting the \fB$USERNAME_EXTENSION\fR
-environment variable will result in its value being appended the user's login
-name.  For instance, if I set \fB$USERNAME_EXTENSION\fR to "+www", my "From:"
-line will contain "Dan Harkless <dan+www@machine.company.com>" (or
-"Dan.Harkless+www" if I'm using mmailid masquerading as well).  Recent versions
-of sendmail automatically deliver all mail sent to \fIuser\fR+\fIstring\fR to
-\fIuser\fR.  qmail has a similar feature which uses '\-' as the delimiter by
-default, but can use other characters as well.
-
-The fourth method of address masquerading is to specify a "From:" line manually
-in the message draft.  It will be used as provided (after alias substitution),
-but normally, to discourage email forgery, the user's \fIreal\fR address will be
-used in the SMTP envelope "From:" and in a "Sender:" header.  However, if the
-"masquerade:" line of mts.conf contains "draft_from", the SMTP envelope "From:"
-will use the address given in the draft "From:", and there will be no "Sender:"
-header.  This is useful in pretending to send mail "directly" from a remote POP3
-account, or when remote email robots give improper precedence to the envelope
-"From:".  Note that your MTA may still reveal your real identity (e.g.
-sendmail's "X\-Authentication\-Warning:" header). 
-
-If nmh has been compiled with SASL support, the `\-sasl' switch will enable
+.PP
+Under normal circumstances,
+.B post
+uses the \*(lqFrom:\*(rq line in the message draft as the identity of
+the the originating mailbox.  A \*(lqFrom:\*(rq line is required in
+all message draft.  By default the message composition utilities such
+as
+.BR comp ,
+.B repl
+and
+.B mhmail
+will automatically place a \*(lqFrom:\*(rq line in the message draft.
+There are two ways to override this behavior, however.
+Note that they apply equally to \*(lqResent\-From:\*(rq lines in messages sent
+with
+.BR dist .
+.PP
+The first way is to supply a \*(lqSender:\*(rq 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 \*(lqFrom:\*(rq line, a \*(lqSender:\*(rq line is
+.BR required .
+If an \*(lqEnvelope-From:\*(rq line is supplied when multiple addresses
+are given in the \*(lqFrom:\*(rq line, a \*(lqSender:\*(rq header will
+be generated using the value of the \*(lqEnvelope-From:\*(rq line,
+.B if
+the \*(lqEnvelope-From:\*(rq line is not blank.
+.PP
+The second way is to supply a \*(lqEnvelope-From:\*(rq 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 \*(lqFrom:\*(rq line and a \*(lqSender:\*(rq line
+(if one is supplied).  The \*(lqEnvelope-From:\*(rq 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.
+.PP
+The mail transport system default is provided in
+.I %etcdir%/mts.conf
+but can be overriiden here with the
+.B \-mts
+switch.
+.PP
+If nmh is using the SMTP MTA, the
+.B \-server
+and the
+.B \-port
+switches can be used to override the default mail server (defined by the
+.RI servers
+entry in
+.I %etcdir%/mts.conf
+).
+.PP
+If
+.B nmh
+has been compiled with SASL support, the
+.B \-sasl
+and
+.B \-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
 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 \*(lq.netrc\*(rq file can be used to store this password).
-`\-saslmech' switch can be used to select a particular SASL mechanism,
-and the the `\-user' switch can be used to select a authorization userid
+user (but the
+.RI \*(lq \&.netrc \*(rq
+file can be used to store this password).
+.B \-saslmech
+switch can be used to select a particular SASL mechanism,
+and the the
+.B \-user
+switch can be used to select a authorization userid
 to provide to SASL other than the default.
 to provide to SASL other than the default.
+.PP
+If SASL authentication is successful, 
+.BR nmh
+will attempt to negotiate a security layer for session encryption.
+Encrypted data is labelled with `(sasl-encrypted)' and `(sasl-decrypted)' when
+viewing the SMTP transaction with the
+.B \-snoop
+switch.  The
+.B \-saslmaxssf
+switch can be used to select the maximum value of the Security Strength Factor.
+This is an integer value and the exact meaning of this value depends on the
+underlying SASL mechanism.  A value of 0 disables encryption.
+.PP
+If
+.B nmh
+has been compiled with TLS support, the
+.B \-tls
+and
+.B \-notls
+switches will require and disable the negotiation of TLS support when
+connecting to the
+SMTP MTA.  Encrypted data is labelled with `(tls-encrypted)' and
+`(tls-decrypted)' when viewing the SMTP transction with the
+.B \-snoop
+switch.
 
 
-Currently SASL security layers are not supported for SMTP.  nmh's SMTP SASL code
-will always negotiate an unencrypted connection.  This means that while the SMTP
-authentication can be encrypted, the subsequent data stream can not.  This is in
-contrast to nmh's POP3 SASL support, where encryption is supported for both the
-authentication and the data stream.
-
-.Fi
+.SH FILES
+.fc ^ ~
+.nf
+.ta \w'%etcdir%/ExtraBigFileName  'u
 ^%etcdir%/mts.conf~^nmh mts configuration file
 ^%etcdir%/MailAliases~^global nmh alias file
 ^%bindir%/refile~^Program to process Fcc:s
 ^%libdir%/mhl~^Program to process Bcc:s
 ^%etcdir%/mts.conf~^nmh mts configuration file
 ^%etcdir%/MailAliases~^global nmh alias file
 ^%bindir%/refile~^Program to process Fcc:s
 ^%libdir%/mhl~^Program to process Bcc:s
-.Pr
-\fIpost\fR does \fBNOT\fR consult the user's \&.mh\(ruprofile
-.Sa
-\fIStandard for the Format of ARPA Internet Text Messages\fR (RFC\-822),
-.br
-mhmail(1), send(1), mh\-mail(5), mh\-alias(5), mh\-tailor(5)
-.De
-`\-alias %etcdir%/MailAliases'
-.Ds
-`\-format'
-.Ds
-`\-nomime'
-.Ds
-`\-nomsgid'
-.Ds
-`\-noverbose'
-.Ds
-`\-nowatch'
-.Ds
-`\-width\ 72'
-.Ds
-`\-nofilter'
-.Co
+.fi
+
+.SH "PROFILE COMPONENTS"
+.B post
+does
+.B NOT
+consult the user's
+.I \&.mh\(ruprofile
+
+.SH "SEE ALSO"
+mhmail(1), send(1), mh\-mail(5), mh\-alias(5), mh\-tailor(5),
+.I "Standard for the Format of ARPA Internet Text Messages"
+(RFC\-822)
+
+.SH DEFAULTS
+.nf
+.RB ` \-alias "' defaults to %etcdir%/MailAliases"
+.RB ` \-format '
+.RB ` \-nomime '
+.RB ` \-nomsgid '
+.RB ` "\-messageid\ localname" '
+.RB ` \-noverbose '
+.RB ` \-nowatch '
+.RB ` "\-width\ 72" '
+.RB ` \-nofilter '
+.fi
+
+.SH CONTEXT
 None
 None
-.Bu
+
+.SH BUGS
 \*(lqReply\-To:\*(rq fields are allowed to have groups in them according
 \*(lqReply\-To:\*(rq fields are allowed to have groups in them according
-to the 822 specification, but \fIpost\fR won't let you use them.
-.En
+to the 822 specification, but
+.B post
+won't let you use them.