* docs/MAIL.FILTERING: added note on removing procmail -f or
[mmh] / man / mh-tailor.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH MH-TAILOR %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 mh-tailor, mts.conf \- mail transport customization for nmh message handler
8 .SH SYNOPSIS
9 .I %etcdir%/mts.conf
10 .SH DESCRIPTION
11 The file
12 .I %etcdir%/mts.conf
13 defines run-time options for those
14 .B nmh
15 programs which interact (in some form) with the message transport system.
16 At present, these (user) programs are:
17 .BR ap ,
18 .BR conflict ,
19 .BR inc ,
20 .BR msgchk ,
21 .BR msh ,
22 .BR post ,
23 .BR rcvdist ,
24 and
25 .BR rcvpack .
26 .PP
27 Each option should be given on a single line.  Blank lines and lines
28 which begin with `#' are ignored.  The options available along with
29 default values and a description of their meanings are listed below:
30 .PP
31 .BR mts :
32 .RS 5
33 The mail transport method to use.  The two acceptable options are
34 .B smtp
35 (which is the default), and
36 .BR sendmail .
37 .PP
38 If you use
39 .BR smtp ,
40 this will enable a direct SMTP (simple mail transport
41 protocol) interface in
42 .BR nmh .
43 When sending mail, instead of passing the
44 message to the mail transport agent,
45 .B post
46 will open a socket connection
47 to the mail port on the machine specified in the
48 .B servers
49 entry.
50 .PP
51 If you use
52 .BR sendmail ,
53 then
54 .B post
55 will send messages by forking a
56 local copy of
57 .BR sendmail .
58 Currently it will still speak SMTP with this local
59 copy of
60 .BR sendmail .
61 .RE
62 .PP
63 .BR localname :
64 .RS 5
65 The hostname
66 .B nmh
67 considers local.  It should typically be a fully
68 qualified hostname.  If this is not set, depending on the version of
69 UNIX you're running,
70 .B nmh
71 will query the system for this value
72 (e.g. uname, gethostname, etc.), and attempt to fully qualify this
73 value.
74 .PP
75 If you are using POP to retrieve new messages, you may want to set this
76 value to the name of the POP server, so that outgoing message appear to
77 have originated on the POP server.
78 .RE
79 .PP
80 .BR localdomain :
81 .RS 5
82 If this is set, a `.' followed by this string will be appended to your
83 hostname.
84 .PP
85 This should only be needed, if for some reason
86 .B nmh
87 is not able to
88 fully qualify the hostname returned by the system (e.g. uname,
89 gethostname, etc.).
90 .RE
91 .PP
92 .BR clientname :
93 .RS 5
94 This option specifies the host name that
95 .B nmh
96 will give in the
97 SMTP
98 .B HELO
99 (and
100 .BR EHLO )
101 command, when posting mail.  If not
102 set, the default is to use the host name that
103 .B nmh
104 considers local
105 (see
106 .B localname
107 above).  If this option is set, but empty, no
108 .B HELO
109 command will be given.
110 .PP
111 Although the
112 /B HELO
113 command is required by RFC\-821, many SMTP servers
114 do not require it.  Early versions of
115 .I SendMail
116 will fail if the hostname
117 given in the
118 .B HELO
119 command is the local host.  Later versions of
120 .I SendMail
121 will complain if you omit the
122 .B HELO
123 command.  If you run
124 .IR SendMail ,
125 find out what your system expects and set this field if needed.
126 .RE
127 .PP
128 .BR systemname :
129 .RS 5
130 This option is only used for UUCP mail.  It specifies the name of the
131 local host in the UUCP \*(lqdomain\*(rq.  If not set, depending
132 on the version of UNIX you're running,
133 .B nmh
134 will query the system
135 for this value.  This has no equivalent in the
136 .B nmh
137 configuration
138 file.
139 .RE
140 .PP
141 .BR mmdfldir :
142 %mailspool%
143 .RS 5
144 The directory where maildrops are kept.  If this option is set, but empty,
145 the user's home directory is used.  This overrides the default value
146 chosen at the time of compilation.
147 .RE
148 .PP
149 .BR mmdflfil :
150 .RS 5
151 The name of the maildrop file in the directory where maildrops are kept.
152 If this is empty, the user's login name is used.  This overrides the default
153 value (which is empty).
154 .RE
155 .PP
156 .BR mmdelim1 :
157 \&\\001\\001\\001\\001\\n
158 .RS 5
159 The beginning-of-message delimiter for maildrops.
160 .RE
161 .PP
162 .BR mmdelim2 :
163 \&\\001\\001\\001\\001\\n
164 .RS 5
165 The end-of-message delimiter for maildrops.
166 .RE
167 .PP
168 .BR masquerade:
169 .RS 5
170 This directive controls three different types of email address masquerading.
171 The three possible values, which may be specified in any combination on the
172 line, separated by spaces, are \*(lqdraft_from\*(rq, \*(lqmmailid\*(rq, and
173 \*(lqusername_extension\*(rq.
174 .PP
175 \*(lqmmailid\*(rq was the only type of masquerading in the original MH package, and
176 apparently stands for \*(lqmasquerade mail identification\*(rq.  This type of
177 masquerading keys off of the GECOS field of the passwd file.  When enabled,
178 .B nmh
179 will check if the user's pw_gecos field in the passwd file is of the
180 form:
181 .PP
182 .RS 5
183 Full Name <fakeusername>
184 .RE
185 .PP
186 If it is, the internal
187 .B nmh
188 routines that find the username and full name
189 of that user will return \*(lqfakeusername\*(rq and \*(lqFull Name\*(rq respectively.  This is
190 useful if you want the messages you send to always appear to come from the name
191 of an MTA alias rather than your actual account name.  For instance, many
192 organizations set up \*(lqFirst.Last\*(rq sendmail aliases for all users.  If this is
193 the case, the GECOS field for each user should look like:
194 .PP
195 .RS 5
196 First [Middle] Last <First.Last>
197 .RE
198 .PP
199 \*(lqusername_extension\*(rq, when specified on the \*(lqmasquerade:\*(rq line, allows a second
200 type of username masquerading.  If the user sets the
201 .B $USERNAME_EXTENSION
202 environment variable, its value will be appended to the actual login name.  For
203 instance, if I am \*(lqdan@company.com\*(rq, and I set
204 .B $USERNAME_EXTENSION
205 to \*(lq\-www\*(rq, my mail will appear to come from \*(lqdan\-www@company.com\*(rq.  This is meant
206 to interact with qmail's \*(lquser\-extension\*(rq feature, where mail sent to
207 .IR user \- string
208 will be delivered to
209 .IR user .
210 Likewise, those using
211 versions of sendmail for which \*(lqplussed user\*(rq processing is active can set
212 .B $USERNAME_EXTENSION
213 to \*(lq+\fIstring\fR\*(rq.  These MTA features are useful
214 because they allow one to use different email addresses in different situations
215 (to aid in automatic mail filtering or in determining where spammers got one's
216 address) while only actually having a single account.  Note that
217 .B $USERNAME_EXTENSION
218 is only appended to the username when \fIpost\fR is
219 generating \*(lq[Resent\-]From:\*(rq lines and the SMTP envelope
220 \*(lqFrom:\*(rq.
221 .BR inc ,
222 for instance, will not try to read from a maildrop file called \*(lqdan\-www\*(rq (to
223 recall the earlier example).
224 .PP
225 \*(lqdraft_from\*(rq controls the most powerful type of address masquerading.  Normally,
226 when a user explicitly specifies a \*(lqFrom:\*(rq header in a draft,
227 .B nmh
228 uses it
229 rather than constructing its own.  However, to discourage email forgery, the
230 SMTP envelope \*(lqFrom:\*(rq and a \*(lqSender:\*(rq header are set to the user's real address.
231 When \*(lqdraft_from\*(rq is turned on, though, the envelope \*(lqFrom:\*(rq will use the
232 address specified in the draft, and there will be no \*(lqSender:\*(rq header.  This is
233 useful when a user wants to pretend to be sending mail \*(lqdirectly\*(rq from a remote
234 POP3 account, or when remote mail robots incorrectly use the envelope \*(lqFrom:\*(rq in
235 preference to the body \*(lqFrom:\*(rq (or refuse to take action when the two don't
236 match).  Note that the MTA may still reveal the user's real identity (e.g.
237 .BR sendmail 's
238 \*(lqX\-Authentication\-Warning:\*(rq header).
239 .RE
240 .PP
241 .BR maildelivery :
242 %libdir%/maildelivery
243 .RS 5
244 The name of the system-wide default
245 .I maildelivery
246 file.
247 See
248 .BR slocal (1)
249 for the details.
250 .RE
251 .PP
252 .BR everyone :
253 200
254 .RS 5
255 The highest user-id which should NOT receive mail addressed to
256 \*(lqeveryone\*(rq.
257 .RE
258 .PP
259 .BR noshell :
260 .RS 5
261 If set, then each user-id greater than \*(lqeveryone\*(rq that has a
262 login shell equivalent to the given value (e.g., \*(lq/bin/csh\*(rq)
263 indicates that mail for \*(lqeveryone\*(rq should not be sent to them.
264 This is useful for handling admin, dummy, and guest logins.
265 .RE
266 .SS "SMTP support"
267 These options are only available if you set
268 .B mts
269 to
270 .BR smtp .
271 .PP
272 .BR hostable :
273 %etcdir%/hosts
274 .RS 5
275 The exceptions file for /etc/hosts used by
276 .B post
277 to try to find
278 official names.  The format of this file is quite simple:
279 .PP
280 .IP 1. 4
281 Comments are surrounded by sharp (`#') and newline.
282 .IP 2. 4
283 Words are surrounded by white space.
284 .IP 3. 4
285 The first word on the line is the official name of a host.
286 .IP 4. 4
287 All words following the official names are aliases for that host.
288 .RE
289 .PP
290 .BR servers :
291 localhost \\01localnet
292 .RS 5
293 A lists of hosts and networks which to look for SMTP servers when
294 posting local mail.  It turns out this is a major win for hosts which
295 don't run an message transport system.  The value of
296 .B servers
297 should be one or more items.  Each item is the name of either a host
298 or a net (in the latter case, precede the name of the net by a \\01).
299 This list is searched when looking for a smtp server to post mail.
300 If a host is present, the SMTP port on that host is tried.  If a net
301 is present, the SMTP port on each host in that net is tried.  Note that
302 if you are running with the BIND code, then any networks specified are
303 ignored (sorry, the interface went away under BIND).
304 .SS "SendMail"
305 This option is only available if you set
306 .B mts
307 to
308 .BR sendmail .
309 .PP
310 .BR sendmail :
311 %sendmailpath%
312 .RS 5
313 The pathname to the
314 .B sendmail
315 program.
316 .RE
317 .SS "Post Office Protocol"
318 This option is only available if you have compiled
319 .B nmh
320 with POP support enabled (i.e., \*(lq--enable-pop\*(rq).
321 .PP
322 .BR pophost :
323 .RS 5
324 The name of the default POP service host.  If this is not set, then
325 .B nmh
326 looks in the standard maildrop areas for waiting mail, otherwise
327 the named POP service host is consulted.
328 .RE
329 \"  .SS "BBoards Delivery"
330 \"  This option is only available if you compiled \fInmh\fP with
331 \"  \*(lqbbdelivery:\ on\*(rq.
332 \"  .PP
333 \"  .BR bbdomain :
334 \"  .RS 5
335 \"  The local BBoards domain (a UCI hack).
336 \"  .RE
337
338 \"  .SS "BBoards & The POP"
339 \"  These options are only available if you compiled \fInmh\fP with
340 \"  \*(lqbboards:\ pop\*(rq and \*(lqpop:\ on\*(rq.
341
342 \"  .PP
343 \"  .BR popbbhost :
344 \"  .RS 5
345 \"  The POP service host which also acts as a BBoard server.  This variable
346 \"  should be set on the POP BBoards client host.
347 \"  .RE
348 \"  .PP
349 \"  .BR popbbuser :
350 \"  .RS 5
351 \"  The guest account on the POP/BB service host.  This should be a different
352 \"  login ID than either the POP user or the BBoards user.  (The user-id
353 \"  \*(lqftp\*(rq is highly recommended.)  This variable should be set on
354 \"  both the POP BBoards client and service hosts.
355 \"  .RE
356 \"  .PP
357 \"  .BR popbblist :
358 \"  %etcdir%/hosts.popbb
359 \"  .RS 5
360 \"  A file containing of lists of hosts that are allowed to use the POP
361 \"  facility to access BBoards using the guest account.  If this file is not
362 \"  present, then no check is made.  This variable should be set on the POP
363 \"  BBoards service host.
364 \"  .RE
365
366 \"  .SS "BBoards & The NNTP"
367 \"  This option is only available if you compiled \fInmh\fP with
368 \"  \*(lqbboards:\ nntp\*(rq and \*(lqpop:\ on\*(rq.
369 \"  .PP
370 \"  .BR nntphost :
371 \"  .RS 5
372 \"  The host which provides the NNTP service.  This variable should be set
373 \"  on the NNTP BBoards client host.
374 \"  .RE
375 .SS "File Locking"
376 A few words on locking:
377 .B nmh
378 has several methods for creating locks
379 on files.  When configuring
380 .BR nmh ,
381 you will need to decide on the
382 locking style and locking directory (if any).  The first controls the
383 method of locking, the second says where lock files should be created.
384 .PP
385 To configure
386 .B nmh
387 for kernel locking, use the \*(lq--with-locking=flock\*(rq configure option if
388 you want to use the
389 .B flock
390 system call; use \*(lq--with-locking=lockf\*(rq if
391 you want to use the
392 .B lockf
393 system call; or use \*(lq--with-locking=fcntl\*(rq
394 if you want to use the
395 .B fcntl
396 system call for kernel-level locking.
397 .PP
398 Instead of kernel locking, you can configure
399 .B nmh
400 to use dot locking by using \*(lq--with-locking=dot\*(rq.  Dot locking
401 specifies that
402 a file should be created whose existence means \*(lqlocked\*(rq and
403 whose non-existence means \*(lqunlocked\*(rq.  The name of this file is
404 constructed by appending \*(lq.lock\*(rq to the name of the file being
405 locked.  If
406 .B LOCKDIR
407 is not specified, lock files will be created
408 in the directory where the file being locked resides.  Otherwise, lock
409 files will be created in the directory specified by
410 .BR LOCKDIR .
411 .PP
412 Prior to installing
413 .BR nmh ,
414 you should see how locking is done at
415 your site, and set the appropriate values.
416
417 .SH FILES
418 .fc ^ ~
419 .nf
420 .ta \w'%etcdir%/ExtraBigFileName  'u
421 ^%etcdir%/mts.conf~^nmh mts configuration file
422 .fi
423
424 .SH "PROFILE COMPONENTS"
425 None
426
427 .SH "SEE ALSO"
428 mh\-mts(8), post(8)
429
430 .SH DEFAULTS
431 As listed above