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