Add support for a -notls switch, for consistency's sake.
[mmh] / man / post.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH POST %manext8% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 post \- deliver a message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B %libdir%/post 
11 .RB [ \-alias
12 .IR aliasfile ]
13 .RB [ \-filter
14 .IR filterfile ]
15 .RB [ \-nofilter ]
16 .RB [ \-format " | " \-noformat ]
17 .RB [ \-mime " | " \-nomime ]
18 .RB [ \-msgid " | " \-nomsgid ]
19 .RB [ \-verbose " | " \-noverbose ]
20 .RB [ \-watch " | " \-nowatch ]
21 .RB [ \-width
22 .IR columns ]
23 .RB [ \-server
24 .IR servername ]
25 .RB [ \-port
26 .IR portname/number ]
27 .RB [ \-sasl ]
28 .RB [ \-nosasl ]
29 .RB [ \-saslmaxssf
30 .IR ssf ]
31 .RB [ \-saslmech
32 .IR mechanism ]
33 .RB [ \-user
34 .IR username ]
35 .RB [ \-tls ]
36 .RB [ \-notls ]
37 .I file
38 .RB [ \-version ]
39 .RB [ \-help ]
40 .ad
41 .SH DESCRIPTION
42 .B Post
43 is the default program called by
44 .B send
45 to deliver
46 the message in
47 .I file
48 to local and remote users.  In fact, most of
49 the features attributed to
50 .B send
51 in its manual page are performed by
52 .BR post ,
53 with
54 .B send
55 acting as a relatively simple preprocessor.
56 Thus, it is
57 .B post
58 which parses the various header fields, appends
59 \*(lqFrom:\*(rq and \*(lqDate:\*(rq lines, and interacts with the mail transport system.
60 .B Post
61 will not normally be called directly by the user.
62 .PP
63 .B Post
64 searches the \*(lqTo:\*(rq, \*(lqcc:\*(rq, \*(lqBcc:\*(rq,
65 \*(lqFcc:\*(rq, and \*(lqResent\-xxx:\*(rq header lines of the specified
66 message for destination addresses, checks these addresses for validity,
67 and formats them so as to conform to ARPAnet Internet Message Format
68 protocol, unless the
69 .B \-noformat
70 flag is set.  This will normally cause
71 \*(lq@\fIlocal\-site\fR\*(rq to be appended to each local destination
72 address, as well as any local return addresses.  The
73 .B \-width
74 .I columns
75 switch can be used to indicate the preferred length of the header
76 components that contain addresses.
77 .PP
78 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
79 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
80 sent to sighted recipients.  The blind recipients will receive an entirely
81 new message with a minimal set of headers.  Included in the body of the
82 message will be a copy of the message sent to the sighted recipients.
83 If
84 .B \-filter
85 .I filterfile
86 is specified, then this copy is filtered
87 (re\-formatted) by
88 .B mhl
89 prior to being sent to the blind recipients.
90 Alternately, if the
91 .B \-mime
92 switch is given, then
93 .B post
94 will use
95 the MIME rules for encapsulation.
96 .PP
97 The
98 .B \-alias
99 .I aliasfile
100 switch can be used to specify a file that post
101 should take aliases from.  More than one file can be specified, each
102 being preceded with
103 .BR \-alias .
104 In any event, the primary alias file is
105 read first.
106 .PP
107 The
108 .B \-msgid
109 switch indicates that a \*(lqMessage\-ID:\*(rq or
110 \*(lqResent\-Message\-ID:\*(rq field should be added to the header.
111 .PP
112 The
113 .B \-verbose
114 switch indicates that the user should be informed of
115 each step of the posting/filing process.
116 .PP
117 The
118 .B \-watch
119 switch indicates that the user would like to watch the
120 transport system's handling of the message (e.g., local and \*(lqfast\*(rq
121 delivery).
122 .PP
123 Under normal circumstances,
124 .B post
125 constructs the \*(lqFrom:\*(rq line of the
126 message from the user's login name, the full name from the GECOS field of the
127 passwd file, and the fully\-qualified name of the local machine (or the
128 value of
129 \*(lqlocalname\*(rq in
130 .IR mts.conf ,
131 if set).  An example is \*(lqFrom: Dan Harkless
132 <dan@machine.example.com>\*(rq.  There are four ways to override these values,
133 however.  Note that they apply equally to \*(lqResent\-From:\*(rq lines in messages sent
134 with
135 .BR dist .
136 .PP
137 The first way is GECOS\-based username masquerading.  If the \*(lqmasquerade:\*(rq line
138 in
139 .I mts.conf
140 contains \*(lqmmailid\*(rq, this processing is activated.  If a user's GECOS
141 field in the passwd file is of the form \*(lqFull Name <fakename>\*(rq then \*(lqfakename\*(rq
142 will be used in place of the real username.  For instance, a GECOS field of \*(lqDan
143 Harkless <Dan.Harkless>\*(rq would result in \*(lqFrom: Dan Harkless
144 <Dan.Harkless@machine.example.com>\*(rq.  Naturally if you were doing something like
145 this you'd want to set up an MTA alias (e.g. in /etc/aliases) from, for
146 instance, \*(lqDan.Harkless\*(rq to \*(lqdan\*(rq.
147 .PP
148 The second way to override default construction of \*(lqFrom:\*(rq is to set the
149 .B $SIGNATURE
150 environment variable.  This variable overrides the full name
151 from the GECOS field, even if GECOS\-based masquerading is being done.  This
152 processing is always active, and does not need to be enabled from
153 .IR mts.conf .
154 .PP
155 The third way is controlled by the \*(lquser_extension\*(rq value of \*(lqmasquerade:\*(rq line
156 of
157 .IR mts.conf .
158 When that's turned on, setting the
159 .B $USERNAME_EXTENSION
160 environment variable will result in its value being appended the user's login
161 name.  For instance, if I set
162 .B $USERNAME_EXTENSION
163 to \*(lq+www\*(rq, my \*(lqFrom:\*(rq
164 line will contain \*(lqDan Harkless <dan+www@machine.example.com>\*(rq (or
165 \*(lqDan.Harkless+www\*(rq if I'm using mmailid masquerading as well).  Recent versions
166 of
167 .B sendmail
168 automatically deliver all mail sent to
169 .IR user + string
170 to
171 .IR user .
172 .B qmail
173 has a similar feature which uses '\-' as the delimiter by
174 default, but can use other characters as well.
175 .PP
176 The fourth method of address masquerading is to specify a \*(lqFrom:\*(rq line manually
177 in the message draft.  It will be used as provided (after alias substitution),
178 but normally, to discourage email forgery, the user's
179 .B real
180 address will be
181 used in the SMTP envelope \*(lqFrom:\*(rq and in a \*(lqSender:\*(rq header.  However, if the
182 \*(lqmasquerade:\*(rq line of
183 .I mts.conf
184 contains \*(lqdraft_from\*(rq, the SMTP envelope \*(lqFrom:\*(rq
185 will use the address given in the draft \*(lqFrom:\*(rq, and there will be no \*(lqSender:\*(rq
186 header.  This is useful in pretending to send mail \*(lqdirectly\*(rq from a remote POP3
187 account, or when remote email robots give improper precedence to the envelope
188 \*(lqFrom:\*(rq.  Note that your MTA may still reveal your real identity (e.g.
189 .BR sendmail 's
190 \*(lqX\-Authentication\-Warning:\*(rq header). 
191 .PP
192 If nmh is using the SMTP MTA, the
193 .B \-server
194 and the
195 .B \-port
196 switches can be used to override the default mail server (defined by the
197 .RI servers
198 entry in
199 .I %etcdir%/mts.conf
200 ).
201 .PP
202 If
203 .B nmh
204 has been compiled with SASL support, the
205 .B \-sasl
206 and
207 .B \-nosasl
208 switches will enable and disable
209 the use of SASL authentication with the SMTP MTA.  Depending on the
210 SASL mechanism used, this may require an additional password prompt from the
211 user (but the
212 .RI \*(lq \&.netrc \*(rq
213 file can be used to store this password).
214 .B \-saslmech
215 switch can be used to select a particular SASL mechanism,
216 and the the
217 .B \-user
218 switch can be used to select a authorization userid
219 to provide to SASL other than the default.
220 .PP
221 If SASL authentication is successful, 
222 .BR nmh
223 will attempt to negotiate a security layer for session encryption.
224 Encrypted data is labelled with `(sasl-encrypted)' and `(sasl-decrypted)' when
225 viewing the SMTP transaction with the
226 .B \-snoop
227 switch.  The
228 .B \-saslmaxssf
229 switch can be used to select the maximum value of the Security Strength Factor.
230 This is an integer value and the exact meaning of this value depends on the
231 underlying SASL mechanism.  A value of 0 disables encryption.
232 .PP
233 If
234 .B nmh
235 has been compiled with TLS support, the
236 .B \-tls
237 and
238 .B \-notls
239 switches will require and disable the negotiation of TLS support when
240 connecting to the
241 SMTP MTA.  Encrypted data is labelled with `(tls-encrypted)' and
242 `(tls-decrypted)' when viewing the SMTP transction with the
243 .B \-snoop
244 switch.
245
246 .SH FILES
247 .fc ^ ~
248 .nf
249 .ta \w'%etcdir%/ExtraBigFileName  'u
250 ^%etcdir%/mts.conf~^nmh mts configuration file
251 ^%etcdir%/MailAliases~^global nmh alias file
252 ^%bindir%/refile~^Program to process Fcc:s
253 ^%libdir%/mhl~^Program to process Bcc:s
254 .fi
255
256 .SH "PROFILE COMPONENTS"
257 .B post
258 does
259 .B NOT
260 consult the user's
261 .I \&.mh\(ruprofile
262
263 .SH "SEE ALSO"
264 mhmail(1), send(1), mh\-mail(5), mh\-alias(5), mh\-tailor(5),
265 .I "Standard for the Format of ARPA Internet Text Messages"
266 (RFC\-822)
267
268 .SH DEFAULTS
269 .nf
270 .RB ` \-alias "' defaults to %etcdir%/MailAliases"
271 .RB ` \-format '
272 .RB ` \-nomime '
273 .RB ` \-nomsgid '
274 .RB ` \-noverbose '
275 .RB ` \-nowatch '
276 .RB ` "\-width\ 72" '
277 .RB ` \-nofilter '
278 .fi
279
280 .SH CONTEXT
281 None
282
283 .SH BUGS
284 \*(lqReply\-To:\*(rq fields are allowed to have groups in them according
285 to the 822 specification, but
286 .B post
287 won't let you use them.