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