Clean up a bunch of unused code and options. Specifically:
[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 [ \-verbose " | " \-noverbose ]
20 .RB [ \-watch " | " \-nowatch ]
21 .RB [ \-width
22 .IR columns ]
23 .RB [ \-server
24 .IR servername ]
25 .RB [ \-port
26 .IR portname/number ]
27 .RB [ \-sasl ]
28 .RB [ \-nosasl ]
29 .RB [ \-saslmaxssf
30 .IR ssf ]
31 .RB [ \-saslmech
32 .IR mechanism ]
33 .RB [ \-user
34 .IR username ]
35 .RB [ \-tls ]
36 .I file
37 .RB [ \-version ]
38 .RB [ \-help ]
39 .ad
40 .SH DESCRIPTION
41 .B Post
42 is the default program called by
43 .B send
44 to deliver
45 the message in
46 .I file
47 to local and remote users.  In fact, most of
48 the features attributed to
49 .B send
50 in its manual page are performed by
51 .BR post ,
52 with
53 .B send
54 acting as a relatively simple preprocessor.
55 Thus, it is
56 .B post
57 which parses the various header fields, appends
58 \*(lqFrom:\*(rq and \*(lqDate:\*(rq lines, and interacts with the mail transport system.
59 .B Post
60 will not normally be called directly by the user.
61 .PP
62 .B Post
63 searches the \*(lqTo:\*(rq, \*(lqcc:\*(rq, \*(lqBcc:\*(rq,
64 \*(lqFcc:\*(rq, and \*(lqResent\-xxx:\*(rq header lines of the specified
65 message for destination addresses, checks these addresses for validity,
66 and formats them so as to conform to ARPAnet Internet Message Format
67 protocol, unless the
68 .B \-noformat
69 flag is set.  This will normally cause
70 \*(lq@\fIlocal\-site\fR\*(rq to be appended to each local destination
71 address, as well as any local return addresses.  The
72 .B \-width
73 .I columns
74 switch can be used to indicate the preferred length of the header
75 components that contain addresses.
76 .PP
77 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
78 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
79 sent to sighted recipients.  The blind recipients will receive an entirely
80 new message with a minimal set of headers.  Included in the body of the
81 message will be a copy of the message sent to the sighted recipients.
82 If
83 .B \-filter
84 .I filterfile
85 is specified, then this copy is filtered
86 (re\-formatted) by
87 .B mhl
88 prior to being sent to the blind recipients.
89 Alternately, if the
90 .B \-mime
91 switch is given, then
92 .B post
93 will use
94 the MIME rules for encapsulation.
95 .PP
96 The
97 .B \-alias
98 .I aliasfile
99 switch can be used to specify a file that post
100 should take aliases from.  More than one file can be specified, each
101 being preceded with
102 .BR \-alias .
103 In any event, the primary alias file is
104 read first.
105 .PP
106 The
107 .B \-msgid
108 switch indicates that a \*(lqMessage\-ID:\*(rq or
109 \*(lqResent\-Message\-ID:\*(rq field should be added to the header.
110 .PP
111 The
112 .B \-verbose
113 switch indicates that the user should be informed of
114 each step of the posting/filing process.
115 .PP
116 The
117 .B \-watch
118 switch indicates that the user would like to watch the
119 transport system's handling of the message (e.g., local and \*(lqfast\*(rq
120 delivery).
121 .PP
122 Under normal circumstances,
123 .B post
124 constructs the \*(lqFrom:\*(rq line of the
125 message from the user's login name, the full name from the GECOS field of the
126 passwd file, and the fully\-qualified name of the local machine (or the
127 value of
128 \*(lqlocalname\*(rq in
129 .IR mts.conf ,
130 if set).  An example is \*(lqFrom: Dan Harkless
131 <dan@machine.example.com>\*(rq.  There are four ways to override these values,
132 however.  Note that they apply equally to \*(lqResent\-From:\*(rq lines in messages sent
133 with
134 .BR dist .
135 .PP
136 The first way is GECOS\-based username masquerading.  If the \*(lqmasquerade:\*(rq line
137 in
138 .I mts.conf
139 contains \*(lqmmailid\*(rq, this processing is activated.  If a user's GECOS
140 field in the passwd file is of the form \*(lqFull Name <fakename>\*(rq then \*(lqfakename\*(rq
141 will be used in place of the real username.  For instance, a GECOS field of \*(lqDan
142 Harkless <Dan.Harkless>\*(rq would result in \*(lqFrom: Dan Harkless
143 <Dan.Harkless@machine.example.com>\*(rq.  Naturally if you were doing something like
144 this you'd want to set up an MTA alias (e.g. in /etc/aliases) from, for
145 instance, \*(lqDan.Harkless\*(rq to \*(lqdan\*(rq.
146 .PP
147 The second way to override default construction of \*(lqFrom:\*(rq is to set the
148 .B $SIGNATURE
149 environment variable.  This variable overrides the full name
150 from the GECOS field, even if GECOS\-based masquerading is being done.  This
151 processing is always active, and does not need to be enabled from
152 .IR mts.conf .
153 .PP
154 The third way is controlled by the \*(lquser_extension\*(rq value of \*(lqmasquerade:\*(rq line
155 of
156 .IR mts.conf .
157 When that's turned on, setting the
158 .B $USERNAME_EXTENSION
159 environment variable will result in its value being appended the user's login
160 name.  For instance, if I set
161 .B $USERNAME_EXTENSION
162 to \*(lq+www\*(rq, my \*(lqFrom:\*(rq
163 line will contain \*(lqDan Harkless <dan+www@machine.example.com>\*(rq (or
164 \*(lqDan.Harkless+www\*(rq if I'm using mmailid masquerading as well).  Recent versions
165 of
166 .B sendmail
167 automatically deliver all mail sent to
168 .IR user + string
169 to
170 .IR user .
171 .B qmail
172 has a similar feature which uses '\-' as the delimiter by
173 default, but can use other characters as well.
174 .PP
175 The fourth method of address masquerading is to specify a \*(lqFrom:\*(rq line manually
176 in the message draft.  It will be used as provided (after alias substitution),
177 but normally, to discourage email forgery, the user's
178 .B real
179 address will be
180 used in the SMTP envelope \*(lqFrom:\*(rq and in a \*(lqSender:\*(rq header.  However, if the
181 \*(lqmasquerade:\*(rq line of
182 .I mts.conf
183 contains \*(lqdraft_from\*(rq, the SMTP envelope \*(lqFrom:\*(rq
184 will use the address given in the draft \*(lqFrom:\*(rq, and there will be no \*(lqSender:\*(rq
185 header.  This is useful in pretending to send mail \*(lqdirectly\*(rq from a remote POP3
186 account, or when remote email robots give improper precedence to the envelope
187 \*(lqFrom:\*(rq.  Note that your MTA may still reveal your real identity (e.g.
188 .BR sendmail 's
189 \*(lqX\-Authentication\-Warning:\*(rq header). 
190 .PP
191 If nmh is using the SMTP MTA, the
192 .B \-server
193 and the
194 .B \-port
195 switches can be used to override the default mail server (defined by the
196 .RI servers
197 entry in
198 .I %etcdir%/mts.conf
199 ).
200 .PP
201 If
202 .B nmh
203 has been compiled with SASL support, the
204 .B \-sasl
205 and
206 .B \-nosasl
207 switches will enable and disable
208 the use of SASL authentication with the SMTP MTA.  Depending on the
209 SASL mechanism used, this may require an additional password prompt from the
210 user (but the
211 .RI \*(lq \&.netrc \*(rq
212 file can be used to store this password).
213 .B \-saslmech
214 switch can be used to select a particular SASL mechanism,
215 and the the
216 .B \-user
217 switch can be used to select a authorization userid
218 to provide to SASL other than the default.
219 .PP
220 If SASL authentication is successful, 
221 .BR nmh
222 will attempt to negotiate a security layer for session encryption.
223 Encrypted data is labelled with `(sasl-encrypted)' and `(sasl-decrypted)' when
224 viewing the SMTP transaction with the
225 .B \-snoop
226 switch.  The
227 .B \-saslmaxssf
228 switch can be used to select the maximum value of the Security Strength Factor.
229 This is an integer value and the exact meaning of this value depends on the
230 underlying SASL mechanism.  A value of 0 disables encryption.
231 .PP
232 If
233 .B nmh
234 has been compiled with TLS support, the
235 .B \-tls
236 switch will require the negotiation of TLS support when connecting to the
237 SMTP MTA.  Encrypted data is labelled with `(tls-encrypted)' and
238 `(tls-decrypted)' when viewing the SMTP transction with the
239 .B \-snoop
240 switch.
241
242 .SH FILES
243 .fc ^ ~
244 .nf
245 .ta \w'%etcdir%/ExtraBigFileName  'u
246 ^%etcdir%/mts.conf~^nmh mts configuration file
247 ^%etcdir%/MailAliases~^global nmh alias file
248 ^%bindir%/refile~^Program to process Fcc:s
249 ^%libdir%/mhl~^Program to process Bcc:s
250 .fi
251
252 .SH "PROFILE COMPONENTS"
253 .B post
254 does
255 .B NOT
256 consult the user's
257 .I \&.mh\(ruprofile
258
259 .SH "SEE ALSO"
260 mhmail(1), send(1), mh\-mail(5), mh\-alias(5), mh\-tailor(5),
261 .I "Standard for the Format of ARPA Internet Text Messages"
262 (RFC\-822)
263
264 .SH DEFAULTS
265 .nf
266 .RB ` \-alias "' defaults to %etcdir%/MailAliases"
267 .RB ` \-format '
268 .RB ` \-nomime '
269 .RB ` \-nomsgid '
270 .RB ` \-noverbose '
271 .RB ` \-nowatch '
272 .RB ` "\-width\ 72" '
273 .RB ` \-nofilter '
274 .fi
275
276 .SH CONTEXT
277 None
278
279 .SH BUGS
280 \*(lqReply\-To:\*(rq fields are allowed to have groups in them according
281 to the 822 specification, but
282 .B post
283 won't let you use them.