]> diplodocus.org Git - nmh/blob - man/post.man
e49d10bfef67e5daffb87f86b591ad961fb2f966
[nmh] / man / post.man
1 .TH POST %manext8% 2016-10-17 "%nmhversion%"
2 .
3 .\" %nmhwarning%
4 .
5 .SH NAME
6 post \- deliver an nmh message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B %nmhlibexecdir%/post
11 .RB [ \-help ]
12 .RB [ \-version ]
13 .RB [ \-alias
14 .IR aliasfile ]
15 .RB [ \-filter
16 .IR filterfile ]
17 .RB [ \-nofilter ]
18 .RB [ \-format " | " \-noformat ]
19 .RB [ \-mime " | " \-nomime ]
20 .RB [ \-msgid " | " \-nomsgid ]
21 .RB [ \-messageid
22 .IR localname " | " random ]
23 .RB [ \-verbose " | " \-noverbose ]
24 .RB [ \-watch " | " \-nowatch ]
25 .RB [ \-width
26 .IR columns ]
27 .RB [ \-mts
28 .IR smtp " | " sendmail/smtp " | " sendmail/pipe ]
29 .RB [ \-sendmail
30 .IR program ]
31 .RB [ \-server
32 .IR servername ]
33 .RB [ \-port
34 .IR portname/number ]
35 .RB [ \-sasl ]
36 .RB [ \-nosasl ]
37 .RB [ \-saslmech
38 .IR mechanism ]
39 .RB [ \-user
40 .IR username ]
41 .RB [ \-tls ]
42 .RB [ \-initialtls ]
43 .RB [ \-notls ]
44 .I file
45 .ad
46 .SH DESCRIPTION
47 .B post
48 is the default program called by
49 .B send
50 to deliver the message in
51 .I file
52 to local and remote users.
53 In fact, most of the features attributed to
54 .B send
55 in its manual page are performed by
56 .BR post ,
57 with
58 .B send
59 acting as a relatively simple preprocessor.
60 Thus, it is
61 .B post
62 which parses the various header fields, appends a
63 \*(lqDate:\*(rq line, and interacts with the mail transport system.
64 .B post
65 will not normally be called directly by the user, but can be replaced
66 by the user with a
67 .I postproc
68 profile component that will have
69 .I file
70 as its final argument.
71 See
72 .IR mh-profile (5)
73 for more information on postproc.
74 .PP
75 .B post
76 searches the \*(lqTo:\*(rq, \*(lqcc:\*(rq, \*(lqBcc:\*(rq,
77 \*(lqFcc:\*(rq, and \*(lqResent\-xxx:\*(rq header lines of the specified
78 message for destination addresses, checks these addresses for validity,
79 and formats them so as to conform to ARPAnet Internet Message Format
80 protocol, unless the
81 .B \-noformat
82 flag is set. This will normally cause
83 \*(lq@\fIlocal\-site\fR\*(rq to be appended to each local destination
84 address, as well as any local return addresses. The
85 .B \-width
86 .I columns
87 switch can be used to indicate the preferred length of the header
88 components that contain addresses.
89 .PP
90 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
91 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
92 sent to sighted recipients. The blind recipients will receive an entirely
93 new message with a minimal set of headers. Included in the body of the
94 message will be a copy of the message sent to the sighted recipients.
95 If
96 .B \-filter
97 .I filterfile
98 is specified, then this copy is filtered (re-formatted) by
99 .B mhl
100 prior to being sent to the blind recipients.
101 Alternately, if the
102 .B \-mime
103 switch is given, then
104 .B post
105 will use the MIME rules for encapsulation.
106 .PP
107 The
108 .B \-alias
109 .I aliasfile
110 switch can be used to specify a file that post should read aliases from.
111 More than one file can be specified, with each being preceded by
112 .BR \-alias .
113 In any event, the primary alias file is read first.
114 .PP
115 The
116 .B \-msgid
117 switch indicates that a \*(lqMessage\-ID:\*(rq or
118 \*(lqResent\-Message\-ID:\*(rq field should be added to the header.
119 .PP
120 The
121 .B \-messageid
122 switch selects the style used for the part appearing after the @
123 in \*(lqMessage\-ID:\*(rq, \*(lqResent\-Message\-ID:\*(rq, and
124 \*(lqContent\-ID:\*(rq header fields. The two acceptable options are
125 .B localname
126 (which is the default),
127 and
128 .BR random .
129 With
130 .BR localname ,
131 the local hostname is used. With
132 .BR random ,
133 a random sequence of characters is used instead. Note that the
134 .B \-msgid
135 switch must be enabled for this switch to have any effect.
136 .PP
137 The
138 .B \-verbose
139 switch indicates that the user should be informed of
140 each step of the posting/filing process.
141 .PP
142 The
143 .B \-watch
144 switch indicates that the user would like to watch the
145 transport system's handling of the message (e.g., local and \*(lqfast\*(rq
146 delivery).
147 .PP
148 Under normal circumstances,
149 .B post
150 uses the \*(lqFrom:\*(rq line in the message draft as the identity of
151 the originating mailbox. A \*(lqFrom:\*(rq line is required in
152 all message drafts. By default the message composition utilities such
153 as
154 .BR comp ,
155 .B repl
156 and
157 .B mhmail
158 will automatically place a \*(lqFrom:\*(rq line in the message draft.
159 There are two ways to override this behavior, however.
160 Note that they apply equally to \*(lqResent\-From:\*(rq lines in messages sent
161 with
162 .BR dist .
163 .PP
164 The first way is to supply a \*(lqSender:\*(rq line. The value of this
165 field will be used as the originating mailbox identity when submitting the
166 message to the mail transport system. If multiple addresses are
167 given in the \*(lqFrom:\*(rq line, a \*(lqSender:\*(rq line is
168 .BR required .
169 If an \*(lqEnvelope-From:\*(rq line is supplied when multiple addresses
170 are given in the \*(lqFrom:\*(rq line, a \*(lqSender:\*(rq header will
171 be generated using the value of the \*(lqEnvelope-From:\*(rq line,
172 .B if
173 the \*(lqEnvelope-From:\*(rq line is not blank.
174 .PP
175 The second way is to supply a \*(lqEnvelope-From:\*(rq line. The value
176 of this field will be used as the originating mailbox identity when
177 submitting the message to the mail transport system. This will override
178 both the value of the \*(lqFrom:\*(rq line and a \*(lqSender:\*(rq line
179 (if one is supplied). The \*(lqEnvelope-From:\*(rq line is allowed to
180 have a blank value; if the value is blank, then the mail transport system
181 will be instructed to not send any bounces in response to the message.
182 Not all mail transport systems support this feature.
183 .PP
184 The mail transport system default is defined in
185 .I %nmhetcdir%/mts.conf
186 but can be overridden here with the
187 .B \-mts
188 switch.
189 .PP
190 If nmh is using
191 .B sendmail/pipe
192 or
193 .B sendmail/smtp
194 as its mail transport system, the
195 .B \-sendmail
196 switch can be used to override the default
197 .B sendmail
198 program.
199 .PP
200 If nmh is using the SMTP MTA, the
201 .B \-server
202 and
203 .B \-port
204 switches can be used to override the default mail server and port.
205 The default server is set with
206 .I servers
207 in
208 .IR %nmhetcdir%/mts.conf ,
209 and the default port is
210 .IR submission ,
211 587.
212 .PP
213 If
214 .B nmh
215 has been compiled with SASL support, the
216 .B \-sasl
217 and
218 .B \-nosasl
219 switches will enable and disable
220 the use of SASL authentication with the SMTP MTA. Depending on the
221 SASL mechanism used, this may require an additional password prompt from the
222 user (but the
223 .I netrc
224 file can be used to store this password, as described in
225 .IR mh-profile (5).
226 The
227 .B \-saslmech
228 switch can be used to select a particular SASL mechanism,
229 and the
230 .B \-user
231 switch can be used to select an authorization userid to provide to SASL,
232 other than the default. The credentials profile entry in
233 .IR mh-profile (5)
234 describes the ways to supply a username and password.
235 .PP
236 If SASL authentication is successful,
237 nmh
238 will attempt to negotiate a security layer for session encryption.
239 Encrypted data is labelled with `(sasl-encrypted)' and `(sasl-decrypted)' when
240 viewing the SMTP transaction with the
241 .B \-snoop
242 switch.
243 Base64-encoded data is wrapped with `b64<>'.
244 (Beware that the SMTP transaction may contain authentication information either
245 in plaintext or easily decoded base64.)
246 .PP
247 If
248 .B nmh
249 has been compiled with TLS support, the
250 .B \-tls
251 and
252 .B \-initialtls
253 switches will require the negotiation of TLS when connecting to the SMTP MTA.
254 The
255 .B \-tls
256 switch will negotiate TLS as part of the normal SMTP protocol
257 using the STARTTLS command. The
258 .B \-initialtls
259 will negotiate TLS immediately after the connection has
260 taken place, before any SMTP commands are sent or received. Encrypted data
261 is labelled with `(tls-encrypted)' and
262 `(tls-decrypted)' when viewing the SMTP transaction with the
263 .B \-snoop
264 switch.
265 Base64-encoded data is wrapped with `b64<>'.
266 (Beware that the SMTP transaction may contain authentication information either
267 in plaintext or easily decoded base64.)
268 The
269 .B \-notls
270 switch will disable all attempts to negotiate TLS.
271 .PP
272 If port 465 is specified and none of the TLS switches were enabled,
273 .B \-initialtls
274 will be implied if TLS support was compiled in. Though port 465 for
275 SMTPS (SMTP over SSL) was deregistered by IANA in 1998, it is still
276 used for that service.
277 .PP
278 .B post
279 filters out header lines with names beginning with \*(lqNmh-\*(rq
280 (case insensitive) from the message draft.
281 Those lines are reserved for internal
282 .B nmh
283 use.
284 .SH FILES
285 .fc ^ ~
286 .nf
287 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
288 ^%nmhetcdir%/mts.conf~^nmh mts configuration file
289 ^%nmhetcdir%/MailAliases~^global nmh alias file
290 ^%bindir%/refile~^Program to process Fcc:s
291 ^%nmhlibexecdir%/mhl~^Program to process Bcc:s
292 .fi
293 .SH "PROFILE COMPONENTS"
294 .B post
295 does
296 .I not
297 consult the user's
298 .I \&.mh_profile
299 .SH "SEE ALSO"
300 .IR mhmail (1),
301 .IR send (1),
302 .IR mh\-mail (5),
303 .IR mh\-alias (5),
304 .IR mh\-profile (5),
305 .IR mh\-tailor (5)
306 .PP
307 .I "Standard for the Format of ARPA Internet Text Messages"
308 (RFC 822)
309 .SH DEFAULTS
310 .nf
311 .RB ` \-alias "' defaults to %nmhetcdir%/MailAliases"
312 .RB ` \-format '
313 .RB ` \-nomime '
314 .RB ` \-nomsgid '
315 .RB ` "\-messageid\ localname" '
316 .RB ` \-noverbose '
317 .RB ` \-nowatch '
318 .RB ` "\-width\ 72" '
319 .RB ` \-nofilter '
320 .fi
321 .SH CONTEXT
322 None
323 .SH BUGS
324 \*(lqReply\-To:\*(rq fields are allowed to have groups in them according
325 to the RFC 822 specification, but
326 .B post
327 won't let you use them.