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