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