]> diplodocus.org Git - nmh/blobdiff - man/mh-tailor.man
lock_file.c: close(2) file descriptor on failure, avoiding leak.
[nmh] / man / mh-tailor.man
index bf90eb21322c2695006e54654f24647657c292e1..b3f08c390ecb0c07987e766c0d8ea652f7f52a2e 100644 (file)
@@ -1,21 +1,19 @@
-.TH MH-TAILOR %manext5% "July 11, 2012" "%nmhversion%"
-.\"
+.TH MH-TAILOR %manext5% 2017-02-19 "%nmhversion%"
+.
 .\" %nmhwarning%
-.\"
+.
 .SH NAME
 mh-tailor, mts.conf \- mail transport configuration for nmh message handler
 .SH DESCRIPTION
 The file
-.I %etcdir%/mts.conf
+.I %nmhetcdir%/mts.conf
 defines run-time options for those
 .B nmh
 programs which interact (in some form) with the message transport system.
 At present, these (user) programs are:
 .BR ap ,
-.BR conflict ,
 .BR inc ,
 .BR msgchk ,
-.BR msh ,
 .BR post ,
 .BR rcvdist ,
 and
@@ -36,14 +34,13 @@ and
 .PP
 If you use
 .BR smtp ,
-this will enable a direct SMTP (simple mail transport
-protocol) interface in
+this will enable a direct SMTP interface in
 .BR nmh .
-When sending mail, instead of passing the
-message to the mail transport agent,
+When sending mail, instead of passing the message to the mail
+transport agent,
 .B post
-will open a socket connection
-to the mail port on the machine specified in the
+will open a socket connection to the mail port on the machine
+specified in the
 .B servers
 entry.
 .PP
@@ -51,8 +48,7 @@ If you use
 .BR sendmail/smtp ,
 then
 .B post
-will send messages by forking a
-local copy of
+will send messages by forking a local copy of
 .BR sendmail .
 It will still speak SMTP with this local copy of
 .BR sendmail .
@@ -73,24 +69,21 @@ This replaces the old, undocumented
 mechanism and retains some of its limitations, such as lack of
 support for the
 .B \-whom
-switch and
-\*(lqDcc:\*(rq header field.
+switch and \*(lqDcc:\*(rq header field.
 .RE
 .PP
 .BR localname :
 .RS 5
 The hostname
 .B nmh
-considers local.  It should typically be a fully
-qualified hostname.  If this is not set, depending on the version of
-UNIX you're running,
+considers local.  It should typically be a fully qualified hostname.
+If this is not set, depending on the version of Unix you're running,
 .B nmh
-will query the system for this value
-(e.g. uname, gethostname, etc.), and attempt to fully qualify this
-value.
+will query the system for this value (e.g.\& uname, gethostname, etc.),
+and attempt to fully qualify this value.
 .PP
 If you are using POP to retrieve new messages, you may want to set this
-value to the name of the POP server, so that outgoing message appear to
+value to the name of the POP server, so that outgoing messages appear to
 have originated on the POP server.
 .RE
 .PP
@@ -101,25 +94,22 @@ hostname.
 .PP
 This should only be needed, if for some reason
 .B nmh
-is not able to
-fully qualify the hostname returned by the system (e.g. uname,
-gethostname, etc.).
+is not able to fully qualify the hostname returned by the system
+(e.g.\& uname, gethostname, etc.).
 .RE
 .PP
 .BR clientname :
 .RS 5
 This option specifies the host name that
 .B nmh
-will give in the
-SMTP
+will give in the SMTP
 .B HELO
 (and
 .BR EHLO )
-command, when posting mail.  If not
-set, the default is to use the host name that
+command, when posting mail.  If not set, the default is to use the
+host name that
 .B nmh
-considers local
-(see
+considers local (see
 .B localname
 above).  If this option is set, but empty, no
 .B HELO
@@ -127,11 +117,10 @@ command will be given.
 .PP
 Although the
 .B HELO
-command is required by RFC\-821, many SMTP servers
-do not require it.  Early versions of
+command is required by RFC 821, many SMTP servers do not require it.
+Early versions of
 .I SendMail
-will fail if the hostname
-given in the
+will fail if the hostname given in the
 .B HELO
 command is the local host.  Later versions of
 .I SendMail
@@ -146,7 +135,7 @@ find out what your system expects and set this field if needed.
 .RS 5
 This option is only used for UUCP mail.  It specifies the name of the
 local host in the UUCP \*(lqdomain\*(rq.  If not set, depending
-on the version of UNIX you're running,
+on the version of Unix you're running,
 .B nmh
 will query the system
 for this value.  This has no equivalent in the
@@ -158,34 +147,22 @@ file.
 .BR mmdfldir :
 %mailspool%
 .RS 5
-The directory where maildrops are kept.  If this option is set, but empty,
+The directory where mail drops are kept.  If this option is set, but empty,
 the user's home directory is used.  This overrides the default value
 chosen at the time of compilation.
 .RE
 .PP
 .BR mmdflfil :
 .RS 5
-The name of the maildrop file in the directory where maildrops are kept.
+The name of the mail drop file in the directory where mail drops are kept.
 If this is empty, the user's login name is used.  This overrides the default
 value (which is empty).
 .RE
 .PP
-.BR mmdelim1 :
-\&\\001\\001\\001\\001\\n
-.RS 5
-The beginning-of-message delimiter for maildrops.
-.RE
-.PP
-.BR mmdelim2 :
-\&\\001\\001\\001\\001\\n
-.RS 5
-The end-of-message delimiter for maildrops.
-.RE
-.PP
 .BR spoollocking :
 %default_locking%
 .RS 5
-The locking algorithm to use when opening the maildrop.  Can be any one of
+The locking algorithm to use when opening the mail drop.  Can be any one of
 the following:
 .PP
 .RS 5
@@ -196,7 +173,7 @@ the following:
 .RE
 .PP
 .BR maildelivery :
-%libdir%/maildelivery
+%nmhlibexecdir%/maildelivery
 .RS 5
 The name of the system-wide default
 .I maildelivery
@@ -205,21 +182,6 @@ See
 .IR slocal (1)
 for the details.
 .RE
-.PP
-.BR everyone :
-200
-.RS 5
-The highest user-id which should NOT receive mail addressed to
-\*(lqeveryone\*(rq.
-.RE
-.PP
-.BR noshell :
-.RS 5
-If set, then each user-id greater than \*(lqeveryone\*(rq that has a
-login shell equivalent to the given value (e.g., \*(lq/bin/csh\*(rq)
-indicates that mail for \*(lqeveryone\*(rq should not be sent to them.
-This is useful for handling admin, dummy, and guest logins.
-.RE
 .SS "SMTP support"
 This option is only available if you set
 .B mts
@@ -229,12 +191,25 @@ to
 .BR servers :
 localhost
 .RS 5
-A lists of hosts and networks which to look for SMTP servers when
-posting non\-local mail.  It turns out this is a major win for hosts
-which don't run an message transport system.  The value of
+A single hostname to be used when performing mail submission via SMTP.
+Previous versions of
+.B nmh
+supported multiple hostnames for
+.BR servers ,
+but the current version of
+.B nmh
+only supports a single entry (the name is kept for backwards compatibility
+reasons).  This can be overridden via the
+.B \-server
+switch to
+.IR send (1).
+It is not possible to change the mail submission port number in the
 .B servers
-should be one or more items.  Each item is the name of a host which
-is (hopefully) running a SMTP server.
+entry; see the
+.B \-port
+switch to
+.IR send (1)
+for this functionality.
 .SS "SendMail"
 This option is only available if you set
 .B mts
@@ -249,115 +224,101 @@ The pathname to the
 program.
 .RE
 .SS "Post Office Protocol"
-This option is only available if you have compiled
-.B nmh
-with POP support enabled (i.e., \*(lq--enable-pop\*(rq).
-.PP
 .BR pophost :
 .RS 5
 The name of the default POP service host.  If this is not set, then
 .B nmh
-looks in the standard maildrop areas for waiting mail, otherwise
+looks in the standard mail drop areas for waiting mail, otherwise
 the named POP service host is consulted.
 .RE
-\"  .SS "BBoards Delivery"
-\"  This option is only available if you compiled \fInmh\fP with
-\"  \*(lqbbdelivery:\ on\*(rq.
-\"  .PP
-\"  .BR bbdomain :
-\"  .RS 5
-\"  The local BBoards domain (a UCI hack).
-\"  .RE
-\"  .SS "BBoards & The POP"
-\"  These options are only available if you compiled \fInmh\fP with
-\"  \*(lqbboards:\ pop\*(rq and \*(lqpop:\ on\*(rq.
-\"  .PP
-\"  .BR popbbhost :
-\"  .RS 5
-\"  The POP service host which also acts as a BBoard server.  This variable
-\"  should be set on the POP BBoards client host.
-\"  .RE
-\"  .PP
-\"  .BR popbbuser :
-\"  .RS 5
-\"  The guest account on the POP/BB service host.  This should be a different
-\"  login ID than either the POP user or the BBoards user.  (The user-id
-\"  \*(lqftp\*(rq is highly recommended.)  This variable should be set on
-\"  both the POP BBoards client and service hosts.
-\"  .RE
-\"  .PP
-\"  .BR popbblist :
-\"  %etcdir%/hosts.popbb
-\"  .RS 5
-\"  A file containing of lists of hosts that are allowed to use the POP
-\"  facility to access BBoards using the guest account.  If this file is not
-\"  present, then no check is made.  This variable should be set on the POP
-\"  BBoards service host.
-\"  .RE
+.\"  .SS "BBoards Delivery"
+.\"  This option is only available if you compiled \fInmh\fP with
+.\"  \*(lqbbdelivery:\ on\*(rq.
+.\"  .PP
+.\"  .BR bbdomain :
+.\"  .RS 5
+.\"  The local BBoards domain (a UCI hack).
+.\"  .RE
+.\"  .SS "BBoards & The POP"
+.\"  These options are only available if you compiled \fInmh\fP with
+.\"  \*(lqbboards:\ pop\*(rq and \*(lqpop:\ on\*(rq.
+.\"  .PP
+.\"  .BR popbbhost :
+.\"  .RS 5
+.\"  The POP service host which also acts as a BBoard server.  This variable
+.\"  should be set on the POP BBoards client host.
+.\"  .RE
+.\"  .PP
+.\"  .BR popbbuser :
+.\"  .RS 5
+.\"  The guest account on the POP/BB service host.  This should be a different
+.\"  login ID than either the POP user or the BBoards user.  (The user-id
+.\"  \*(lqftp\*(rq is highly recommended.)  This variable should be set on
+.\"  both the POP BBoards client and service hosts.
+.\"  .RE
+.\"  .PP
+.\"  .BR popbblist :
+.\"  %nmhetcdir%/hosts.popbb
+.\"  .RS 5
+.\"  A file containing of lists of hosts that are allowed to use the POP
+.\"  facility to access BBoards using the guest account.  If this file is not
+.\"  present, then no check is made.  This variable should be set on the POP
+.\"  BBoards service host.
+.\"  .RE
 .SS "File Locking"
 A few words on locking:
 .B nmh
-has several methods for creating locks
-on files.  When configuring
-.BR nmh ,
-you will need to decide on the
-locking style and locking directory (if any).  The first controls the
-method of locking, the second says where lock files should be created.
+has two main uses for locking: locking the mail spool during mail
+incorporation, and locking metadata files (sequence files, the context)
+during updates.  These locking methods can be configured separately
+from each other.
 .PP
-To configure
-.B nmh
-for kernel locking, use the \*(lq--with-locking=flock\*(rq configure option if
-you want to use the
-.B flock
-system call; use \*(lq--with-locking=lockf\*(rq if
-you want to use the
-.B lockf
-system call; or use \*(lq--with-locking=fcntl\*(rq
-if you want to use the
+For locking the mail spool, the
+.B spoollocking
+entry in
+.IR mh\-tailor (5)
+will control the locking algorithm to use when
+.B inc
+incorporates mail from the spool file.  If no entry is given, a default
+based on the operating system type will be chosen.
+.PP
+For locking all other files, the
+.B datalocking
+entry in
+.IR mh-profile (5)
+controls the locking algorithm used for all other file access.
+If no entry is given, the
 .B fcntl
-system call for kernel-level locking.
+lock method will be chosen.
 .PP
-Instead of kernel locking, you can configure
-.B nmh
-to use dot locking by using \*(lq--with-locking=dot\*(rq.  Dot locking
-specifies that
-a file should be created whose existence means \*(lqlocked\*(rq and
-whose non-existence means \*(lqunlocked\*(rq.  The name of this file is
-constructed by appending \*(lq.lock\*(rq to the name of the file being
-locked.  If \*(lq--enable-lockdir=directory\*(rq
-is not specified at build time, lock files will be created
-in the directory where the file being locked resides.  Otherwise, lock
+If you do not wish to use kernel-based locking,
+.I dot
+locking is an option available.  If \*(lq--enable-lockdir=directory\*(rq
+is not specified at build time, lock files will be created in the
+directory where the file being locked resides.  Otherwise, lock
 files will be created in the directory specified by
 \*(lq--enable-lockdir\*(rq.
 .PP
 Prior to installing
 .BR nmh ,
-you should see how locking is done at
-your site, and set the appropriate values.
+you should see how locking is done at your site, and set the appropriate values.
 .SH FILES
-.fc ^ ~
-.nf
-.ta \w'%etcdir%/ExtraBigFileName  'u
-^%etcdir%/mts.conf~^nmh mts configuration file
-.fi
+.TP 20
+%nmhetcdir%/mts.conf
+nmh mts configuration file
 .SH "PROFILE COMPONENTS"
 None
 .SH "SEE ALSO"
 .IR mh\-mts (8),
 .IR post (8)
 .SH DEFAULTS
-As listed above.  The path of the mail transport configuration
-file can be changed with the
-.B MHMTSCONF
-environment variable and augmented with the
-.B MHMTSUSERCONF
-environment variable, see mh\-profile(5).
+As listed above.  The path of the mail transport configuration file can
+be changed with the MHMTSCONF environment variable and augmented with the
+MHMTSUSERCONF environment variable, see
+.IR mh\-profile (5).
 .SH BUGS
 Failure to open any mail transport configuration file is silently
 ignored.  Therefore, it's best to avoid dynamic creation of such
-a file with the intent of use via the
-.B MHMTSCONF
-or
-.B MHMTSUSERCONF
+a file with the intent of use via the MHMTSCONF or MHMTSUSERCONF
 environment variables.  If such use is necessary, the ability
 to successfully open the file should first be verified.