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