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