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