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