THE EXIM MAIL TRANSFER AGENT
----------------------------

Copyright (c) 1997 University of Cambridge.
See the file NOTICE for conditions of use and distribution.

There is a mailing list for Exim whose address is exim-users@lists.cam.ac.uk;
requests to be added should be sent to exim-users-request@lists.cam.ac.uk.


EXIM DISTRIBUTION
-----------------

Unpacking the tar file should produce a single directory called exim-<version>,
containing the following files and directories:

LICENCE        the GNU General Public Licence
Makefile       top level Makefile
OS/            directory containing OS-specific files
NOTICE         notice about conditions of use
README         this file
doc/           directory of documentation files
exim_monitor/  directory of source files for the Exim monitor
regexp/        directory of source files for regular expression routines
scripts/       directory of scripts used in the build process
src/           directory of source files
util/          directory of independent utilities

Please see the documentation files for full instructions on how to build,
install, and run Exim. For straightforward installations on operating systems
to which Exim has already been ported, the building process is as follows:

. Edit the file called src/EDITME and put the result in a file called
  Local/Makefile. There are comments in src/EDITME telling you what the
  various parameters are. You must at least provide values for CONFIGURE_FILE,
  BIN_DIRECTORY, and SPOOL_DIRECTORY. Other parameters can be defaulted, though
  it is recommended you set up a uid and gid for Exim and declare their values
  in EXIM_USER and EXIM_GROUP.

. There are a number of additional parameters whose defaults can also be
  overridden by additions to Local/Makefile. The basic defaults are in
  OS/Makefile-Default, but these settings are overridden for some operating
  systems by values on OS/Makefile-<osname>. The most commonly-required change
  is probably the setting of CC, which defines the command to run the C
  compiler, and which defaults to gcc. To change it to cc, add the following
  line to Local/Makefile:

  CC=cc

. If you are going to compile the Exim monitor, edit the file called
  exim_monitor/EDITME and put the result in a file called Local/eximon.conf.
  If you are not going to compile the Exim monitor, you should have commented
  out the line starting EXIM_MONITOR= when creating Local/Makefile. There are
  comments in exim_monitor/EDITME about the values set therein, but in this
  case everything can be defaulted if you wish.

. Type "make". This will determine what your machine's architecture and
  operating system are, and create a build directory from those names (e.g.
  "build-SunOS5-sparc"). Symbolic links are created from the build directory
  to the source directory. A configured make file called <build-dir>/makefile
  is then created, and "make" then goes on to use this to build various
  binaries and scripts inside the build directory.

. Type "make install", while running as root, to install the binaries,
  scripts, and a default configuration file. To see what this command is
  going to do before risking it, run "../scripts/exim_install -n" (not as
  root) from within the build directory. Running the install script does NOT
  replace /usr/lib/sendmail with a link to Exim. That step you must perform by
  hand when you are satisfied that Exim is running correctly.

. The default configuration file will use your host's fully qualified name (as
  obtained from the uname() function) as the only local mail domain and as the
  domain which is used to qualify unqualified local mail addresses. See the
  comments in the default configuration file if you want to change these.

The operating systems currently supported are: AIX, BSDI, DGUX, FreeBSD, HI-OSF
(Hitachi), HP-UX, IRIX, Linux, NetBSD, OpenBSD, DEC's OSF1 (aka Digital Unix),
SCO, SCO SVR4.2 (aka UNIX-SV), SunOS4, SunOS5, Ultrix and Unixware. However,
code is not available for determining system load averages on AIX or Ultrix.


******* Modifying the building process ******

Instructions for overriding the build-time options for Exim are given in the
manual. You should never have to modify any of the supplied files; it should be
possible to override everything that is necessary by creating suitable files in
the Local directory. This means that you won't need to redo your modifications
for the next release of Exim. If you find you can't avoid changing some other
file, let me know and I'll see if I can find a way of making that unnecessary.

Briefly, the building process concatenates a number of files in order to
construct its working makefile. If <ostype> and <archtype> are the operating
system and architecture types respectively, the files used are:

  OS/Makefile-Default
  OS/Makefile-<ostype>
  Local/Makefile
  Local/Makefile-<ostype>
  Local/Makefile-<archtype>
  Local/Makefile-<ostype>-<archtype>
  OS/Makefile-Base

Of the Local/* files, only Local/Makefile is required to exist; the rest are
optional. Because of the way "make" works, values set in later files override
values set in earlier ones. Thus you can set up general options that are
overridden for specify operating systems and/or architectures if you wish.


******* IMPORTANT FOR LINUX USERS *******

Exim makes use of the fcntl() system call to effect file locking. It uses this
for its databases of "hints", which are kept as DBM files. Some releases of
Linux come with DBM functions that do their own locking, unlike the versions in
other systems, which leave all file locking up to the application. This would
not be a disaster, except that the obsolescent flock() locking function is
used, and Linux objects to a mixture of flock() and fcntl() locking on the same
file.

Others who know more about these things than I do support the view that, as
flock() is obsolescent, Exim should not be bent to accommodate it just for this
reason. The way out of the problem is to install a DBM library that does not
suffer from this problem. One that is in widespread use is the "db" library
from Berkeley, that can be obtained by anonymous ftp from

  ftp.cs.berkeley.edu

in one of the files ucb/4bsd/db.tar.Z or ucb/4bsd/db.tar.gz. By default, Exim
will use the ndbm compatibility function interface to this library, but it can
be configured to use the native calls by setting USE_DB in an appropriate
configuration file.


******* IMPORTANT FOR LINUX NFS USERS *******

There are problems with locking in Linux 2.0.27 when delivering to a file
that is NFS mounted. This is the official word from the author of the NFS code
in Linux:

  There is nothing in the NFS spec that requires the client to update its
  cached link count.

  Nevertheless, I guess I'll have to support this in the upcoming NFS
  code... For the time being, I suggest exim users apply the following
  patch to fs/nfs/dir.c, function nfs_link:

  -------- fake patch -----
	  nfs_lookup_cache_remove(dir, oldinode, NULL);
  +	  NFS_CACHEINV(oldinode);
	  iput(oldinode);
  -------------------------

This is only relevant if you are going to deliver mail to files that are
NFS-mounted. In fact, the code in Exim 1.60 has been improved so that most of
the time it won't be affected by this problem.

Philip Hazel <ph10@cus.cam.ac.uk>
