SASL support from Ken Hornstein <kenh@cmf.nrl.navy.mil>.
[mmh] / man / post.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .\" include the -mh macro file
6 .so %etcdir%/tmac.h
7 .\"
8 .TH POST %manext8% MH.6.8 [%nmhversion%]
9 .SH NAME
10 post \- deliver a message
11 .SH SYNOPSIS
12 .in +.5i
13 .ti -.5i
14 %libdir%/post 
15 \%[\-alias\ aliasfile]
16 .br
17 \%[\-filter\ filterfile] \%[\-nofilter]
18 \%[\-format] \%[\-noformat]
19 .br
20 \%[\-mime] \%[\-nomime]
21 \%[\-msgid] \%[\-nomsgid]
22 \%[\-verbose]
23 .br
24 \%[\-noverbose]
25 \%[\-watch] \%[\-nowatch]
26 \%[\-width\ columns]
27 \%[\-sasl] \%[\-saslmech\ mechanism] \%[\-user\ username]
28 .br
29 file
30 \%[\-version]
31 \%[\-help]
32 .in -.5i
33 .SH DESCRIPTION
34 \fIPost\fR is the default program called by \fIsend\fR\0(1) to deliver
35 the message in \fIfile\fR to local and remote users.  In fact, most of
36 the features attributed to \fIsend\fR in its manual page are performed by
37 \fIpost\fR, with \fIsend\fR acting as a relatively simple preprocessor.
38 Thus, it is \fIpost\fR which parses the various header fields, appends
39 From: and Date: lines, and interacts with the mail transport system.
40 \fIPost\fR will not normally be called directly by the user.
41
42 \fIPost\fR searches the \*(lqTo:\*(rq, \*(lqcc:\*(rq, \*(lqBcc:\*(rq,
43 \*(lqFcc:\*(rq, and \*(lqResent\-xxx:\*(rq header lines of the specified
44 message for destination addresses, checks these addresses for validity,
45 and formats them so as to conform to ARPAnet Internet Message Format
46 protocol, unless the `\-noformat' flag is set.  This will normally cause
47 \*(lq@\fIlocal\-site\fR\*(rq to be appended to each local destination
48 address, as well as any local return addresses.  The `\-width\ columns'
49 switch can be used to indicate the preferred length of the header
50 components that contain addresses.
51
52 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
53 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
54 sent to sighted recipients.  The blind recipients will receive an entirely
55 new message with a minimal set of headers.  Included in the body of the
56 message will be a copy of the message sent to the sighted recipients.
57 If `\-filter\ filterfile' is specified, then this copy is filtered
58 (re\-formatted) by \fImhl\fR prior to being sent to the blind recipients.
59 Alternately, if the `\-mime' switch is given, then \fIpost\fR will use
60 the MIME rules for encapsulation.
61
62 The `\-alias\ aliasfile' switch can be used to specify a file that post
63 should take aliases from.  More than one file can be specified, each
64 being preceded with `\-alias'.  In any event, the primary alias file is
65 read first.
66
67 The `\-msgid' switch indicates that a \*(lqMessage\-ID:\*(rq or
68 \*(lqResent\-Message\-ID:\*(rq field should be added to the header.
69
70 The `\-verbose' switch indicates that the user should be informed of
71 each step of the posting/filing process.
72
73 The `\-watch' switch indicates that the user would like to watch the
74 transport system's handling of the message (e.g., local and \*(lqfast\*(rq
75 delivery).
76
77 Under normal circumstances, \fIpost\fR constructs the "From:" line of the
78 message from the user's login name, the full name from the GECOS field of the
79 passwd file, and the fully\-qualified name of the local machine (or the value of
80 "localname" in mts.conf, if set).  An example is "From: Dan Harkless
81 <dan@machine.company.com>".  There are four ways to override these values,
82 however.  Note that they apply equally to "Resent\-From:" lines in messages sent
83 with \fIdist\fR.
84
85 The first way is GECOS\-based username masquerading.  If the "masquerade:" line
86 in mts.conf contains "mmailid", this processing is activated.  If a user's GECOS
87 field in the passwd file is of the form "Full Name <fakename>" then "fakename"
88 will be used in place of the real username.  For instance, a GECOS field of "Dan
89 Harkless <Dan.Harkless>" would result in "From: Dan Harkless
90 <Dan.Harkless@machine.company.com>".  Naturally if you were doing something like
91 this you'd want to set up an MTA alias (e.g. in /etc/aliases) from, for
92 instance, "Dan.Harkless" to "dan".
93
94 The second way to override default construction of "From:" is to set the
95 \fB$SIGNATURE\fR environment variable.  This variable overrides the full name
96 from the GECOS field, even if GECOS\-based masquerading is being done.  This
97 processing is always active, and does not need to be enabled from mts.conf.
98
99 The third way is controlled by the "user_extension" value of "masquerade:" line
100 of mts.conf.  When that's turned on, setting the \fB$USERNAME_EXTENSION\fR
101 environment variable will result in its value being appended the user's login
102 name.  For instance, if I set \fB$USERNAME_EXTENSION\fR to "+www", my "From:"
103 line will contain "Dan Harkless <dan+www@machine.company.com>" (or
104 "Dan.Harkless+www" if I'm using mmailid masquerading as well).  Recent versions
105 of sendmail automatically deliver all mail sent to \fIuser\fR+\fIstring\fR to
106 \fIuser\fR.  qmail has a similar feature which uses '\-' as the delimiter by
107 default, but can use other characters as well.
108
109 The fourth method of address masquerading is to specify a "From:" line manually
110 in the message draft.  It will be used as provided (after alias substitution),
111 but normally, to discourage email forgery, the user's \fIreal\fR address will be
112 used in the SMTP envelope "From:" and in a "Sender:" header.  However, if the
113 "masquerade:" line of mts.conf contains "draft_from", the SMTP envelope "From:"
114 will use the address given in the draft "From:", and there will be no "Sender:"
115 header.  This is useful in pretending to send mail "directly" from a remote POP3
116 account, or when remote email robots give improper precedence to the envelope
117 "From:".  Note that your MTA may still reveal your real identity (e.g.
118 sendmail's "X\-Authentication\-Warning:" header). 
119
120 If nmh has been compiled with SASL support, the `\-sasl' switch will enable
121 the use of SASL authentication with the SMTP MTA.  Depending on the
122 SASL mechanism used, this may require an additional password prompt from the
123 user (but the \*(lq.netrc\*(rq file can be used to store this password).
124 `\-saslmech' switch can be used to select a particular SASL mechanism,
125 and the the `\-user' switch can be used to select a authorization userid
126 to provide to SASL other than the default.
127
128 Currently SASL security layers are not supported for SMTP.  The SASL
129 SMTP code in nmh will always negotiate an unencrypted connection.
130
131 .Fi
132 ^%etcdir%/mts.conf~^nmh mts configuration file
133 ^%etcdir%/MailAliases~^global nmh alias file
134 ^%bindir%/refile~^Program to process Fcc:s
135 ^%libdir%/mhl~^Program to process Bcc:s
136 .Pr
137 \fIpost\fR does \fBNOT\fR consult the user's \&.mh\(ruprofile
138 .Sa
139 \fIStandard for the Format of ARPA Internet Text Messages\fR (RFC\-822),
140 .br
141 mhmail(1), send(1), mh\-mail(5), mh\-alias(5), mh\-tailor(5)
142 .De
143 `\-alias %etcdir%/MailAliases'
144 .Ds
145 `\-format'
146 .Ds
147 `\-nomime'
148 .Ds
149 `\-nomsgid'
150 .Ds
151 `\-noverbose'
152 .Ds
153 `\-nowatch'
154 .Ds
155 `\-width\ 72'
156 .Ds
157 `\-nofilter'
158 .Co
159 None
160 .Bu
161 \*(lqReply\-To:\*(rq fields are allowed to have groups in them according
162 to the 822 specification, but \fIpost\fR won't let you use them.
163 .En