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