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