Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a4080654d049ad31b216b761b9173c1f > files > 143

exim-doc-4.69-4mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on September, 10 2009 by texi2html 1.78 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>

-->
<head>
<title>Specification of the Exim Mail Transfer Agent: 4. Building and installing Exim</title>

<meta name="description" content="Specification of the Exim Mail Transfer Agent: 4. Building and installing Exim">
<meta name="keywords" content="Specification of the Exim Mail Transfer Agent: 4. Building and installing Exim">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.78">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Building-and-installing-Exim"></a>
<a name="SEC31"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="spec_3.html#SEC30" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC32" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec_3.html#SEC13" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 4. Building and installing Exim </h1>


<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC32">4.1 Unpacking</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC33">4.2 Multiple machine architectures and operating systems</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC34">4.3 DBM libraries</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC35">4.4 Pre-building configuration</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC36">4.5 Support for iconv()</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC37">4.6 Including TLS/SSL encryption support</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC38">4.7 Use of tcpwrappers</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC39">4.8 Including support for IPv6</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC40">4.9 The building process</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC41">4.10 Output from &quot;make&quot;</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC42">4.11 Overriding build-time options for Exim</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC43">4.12 OS-specific header files</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC44">4.13 Overriding build-time options for the monitor</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC45">4.14 Installing Exim binaries and scripts</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC46">4.15 Installing info documentation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC47">4.16 Setting up the spool directory</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC48">4.17 Testing</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC49">4.18 Replacing another MTA with Exim</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC50">4.19 Upgrading Exim</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC51">4.20 Stopping the Exim daemon on Solaris</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Unpacking"></a>
<a name="SEC32"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC31" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC33" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.1 Unpacking </h2>

<p>Exim is distributed as a gzipped or bzipped tar file which, when unpacked,
creates a directory with the name of the current release (for example,
&lsquo;<tt>exim-4.69</tt>&rsquo;) into which the following files are placed:
</p>
<table>
<tr><td>
<p>&lsquo;<tt>ACKNOWLEDGMENTS</tt>&rsquo;</p></td><td><p> contains some acknowledgments
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>CHANGES</tt>&rsquo;</p></td><td><p> contains a reference to where changes are documented
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>LICENCE</tt>&rsquo;</p></td><td><p> the GNU General Public Licence
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>Makefile</tt>&rsquo;</p></td><td><p> top-level make file
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>NOTICE</tt>&rsquo;</p></td><td><p> conditions for the use of Exim
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>README</tt>&rsquo;</p></td><td><p> list of files, directories and simple build instructions
</p></td></tr>
</table>

<p>Other files whose names begin with &lsquo;<tt>README</tt>&rsquo; may also be present. The
following subdirectories are created:
</p>
<table>
<tr><td>
<p>&lsquo;<tt>Local</tt>&rsquo;</p></td><td><p> an empty directory for local configuration files
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>OS</tt>&rsquo;</p></td><td><p> OS-specific files
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>doc</tt>&rsquo;</p></td><td><p> documentation files
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>exim_monitor</tt>&rsquo;</p></td><td><p> source files for the Exim monitor
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>scripts</tt>&rsquo;</p></td><td><p> scripts used in the build process
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>src</tt>&rsquo;</p></td><td><p> remaining source files
</p></td></tr>
<tr><td>
<p>&lsquo;<tt>util</tt>&rsquo;</p></td><td><p> independent utilities
</p></td></tr>
</table>

<p>The main utility programs are contained in the &lsquo;<tt>src</tt>&rsquo; directory, and are built
with the Exim binary. The &lsquo;<tt>util</tt>&rsquo; directory contains a few optional scripts
that may be useful to some sites.
</p>
<hr size="6">
<a name="Multiple-machine-architectures-and-operating-systems"></a>
<a name="SEC33"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC32" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC34" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.2 Multiple machine architectures and operating systems </h2>

<p>The building process for Exim is arranged to make it easy to build binaries for
a number of different architectures and operating systems from the same set of
source files. Compilation does not take place in the &lsquo;<tt>src</tt>&rsquo; directory.
Instead, a <em>build directory</em> is created for each architecture and operating
system.
<a name="IDX76"></a>
Symbolic links to the sources are installed in this directory, which is where
the actual building takes place. In most cases, Exim can discover the machine
architecture and operating system for itself, but the defaults can be
overridden if necessary.
</p>
<hr size="6">
<a name="DBM-libraries"></a>
<a name="SEC34"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC33" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC35" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.3 DBM libraries </h2>

<p>Even if you do not use any DBM files in your configuration, Exim still needs a
DBM library in order to operate, because it uses indexed files for its hints
databases. Unfortunately, there are a number of DBM libraries in existence, and
different operating systems often have different ones installed.
</p>
<a name="IDX77"></a>
<a name="IDX78"></a>
<a name="IDX79"></a>
<a name="IDX80"></a>
<p>If you are using Solaris, IRIX, one of the modern BSD systems, or a modern
Linux distribution, the DBM configuration should happen automatically, and you
may be able to ignore this section. Otherwise, you may have to learn more than
you would like about DBM libraries from what follows.
</p>
<a name="IDX81"></a>
<p>Licensed versions of Unix normally contain a library of DBM functions operating
via the <em>ndbm</em> interface, and this is what Exim expects by default. Free
versions of Unix seem to vary in what they contain as standard. In particular,
some early versions of Linux have no default DBM library, and different
distributors have chosen to bundle different libraries with their packaged
versions. However, the more recent releases seem to have standardized on the
Berkeley DB library.
</p>
<p>Different DBM libraries have different conventions for naming the files they
use. When a program opens a file called &lsquo;<tt>dbmfile</tt>&rsquo;, there are several
possibilities:
</p>
<ol>
<li>
A traditional <em>ndbm</em> implementation, such as that supplied as part of
Solaris, operates on two files called &lsquo;<tt>dbmfile.dir</tt>&rsquo; and &lsquo;<tt>dbmfile.pag</tt>&rsquo;.

</li><li>
<a name="IDX82"></a>
The GNU library, <em>gdbm</em>, operates on a single file. If used via its <em>ndbm</em>
compatibility interface it makes two different hard links to it with names
&lsquo;<tt>dbmfile.dir</tt>&rsquo; and &lsquo;<tt>dbmfile.pag</tt>&rsquo;, but if used via its native interface, the
file name is used unmodified.

</li><li>
<a name="IDX83"></a>
The Berkeley DB package, if called via its <em>ndbm</em> compatibility interface,
operates on a single file called &lsquo;<tt>dbmfile.db</tt>&rsquo;, but otherwise looks to the
programmer exactly the same as the traditional <em>ndbm</em> implementation.

</li><li>
If the Berkeley package is used in its native mode, it operates on a single
file called &lsquo;<tt>dbmfile</tt>&rsquo;; the programmer's interface is somewhat different to
the traditional <em>ndbm</em> interface.

</li><li>
To complicate things further, there are several very different versions of the
Berkeley DB package. Version 1.85 was stable for a very long time, releases
2.<em>x</em> and 3.<em>x</em> were current for a while, but the latest versions are now
numbered 4.<em>x</em>. Maintenance of some of the earlier releases has ceased. All
versions of Berkeley DB can be obtained from
<strong><a href="http://www.sleepycat.com/">http://www.sleepycat.com/</a></strong>.

</li><li>
<a name="IDX84"></a>
Yet another DBM library, called <em>tdb</em>, is available from
<strong><a href="http://download.sourceforge.net/tdb">http://download.sourceforge.net/tdb</a></strong>. It has its own interface, and also
operates on a single file.
</li></ol>

<a name="IDX85"></a>
<a name="IDX86"></a>
<p>Exim and its utilities can be compiled to use any of these interfaces. In order
to use any version of the Berkeley DB package in native mode, you must set
USE_DB in an appropriate configuration file (typically
&lsquo;<tt>Local/Makefile</tt>&rsquo;). For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">USE_DB=yes
</pre></td></tr></table>

<p>Similarly, for gdbm you set USE_GDBM, and for tdb you set USE_TDB. An
error is diagnosed if you set more than one of these.
</p>
<p>At the lowest level, the build-time configuration sets none of these options,
thereby assuming an interface of type (1). However, some operating system
configuration files (for example, those for the BSD operating systems and
Linux) assume type (4) by setting USE_DB as their default, and the
configuration files for Cygwin set USE_GDBM. Anything you set in
&lsquo;<tt>Local/Makefile</tt>&rsquo;, however, overrides these system defaults.
</p>
<p>As well as setting USE_DB, USE_GDBM, or USE_TDB, it may also be
necessary to set DBMLIB, to cause inclusion of the appropriate library, as
in one of these lines:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">DBMLIB = -ldb
DBMLIB = -ltdb
</pre></td></tr></table>

<p>Settings like that will work if the DBM library is installed in the standard
place. Sometimes it is not, and the library's header file may also not be in
the default path. You may need to set INCLUDE to specify where the header
file is, and to specify the path to the library more fully in DBMLIB, as in
this example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">INCLUDE=-I/usr/local/include/db-4.1
DBMLIB=/usr/local/lib/db-4.1/libdb.a
</pre></td></tr></table>

<p>There is further detailed discussion about the various DBM libraries in the
file &lsquo;<tt>doc/dbm.discuss.txt</tt>&rsquo; in the Exim distribution.
</p>
<hr size="6">
<a name="Pre_002dbuilding-configuration"></a>
<a name="SEC35"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC34" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC36" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.4 Pre-building configuration </h2>

<p>Before building Exim, a local configuration file that specifies options
independent of any operating system has to be created with the name
&lsquo;<tt>Local/Makefile</tt>&rsquo;. A template for this file is supplied as the file
&lsquo;<tt>src/EDITME</tt>&rsquo;, and it contains full descriptions of all the option settings
therein. These descriptions are therefore not repeated here. If you are
building Exim for the first time, the simplest thing to do is to copy
&lsquo;<tt>src/EDITME</tt>&rsquo; to &lsquo;<tt>Local/Makefile</tt>&rsquo;, then read it and edit it appropriately.
</p>
<p>There are three settings that you must supply, because Exim will not build
without them. They are the location of the run time configuration file
(CONFIGURE_FILE), the directory in which Exim binaries will be installed
(BIN_DIRECTORY), and the identity of the Exim user (EXIM_USER and
maybe EXIM_GROUP as well). The value of CONFIGURE_FILE can in fact be
a colon-separated list of file names; Exim uses the first of them that exists.
</p>
<p>There are a few other parameters that can be specified either at build time or
at run time, to enable the same binary to be used on a number of different
machines. However, if the locations of Exim's spool directory and log file
directory (if not within the spool directory) are fixed, it is recommended that
you specify them in &lsquo;<tt>Local/Makefile</tt>&rsquo; instead of at run time, so that errors
detected early in Exim's execution (such as a malformed configuration file) can
be logged.
</p>
<a name="IDX87"></a>
<p>Exim's interfaces for calling virus and spam scanning software directly from
access control lists are not compiled by default. If you want to include these
facilities, you need to set
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">WITH_CONTENT_SCAN=yes
</pre></td></tr></table>

<p>in your &lsquo;<tt>Local/Makefile</tt>&rsquo;. For details of the facilities themselves, see
chapter <a href="spec_41.html#SEC358">Content scanning at ACL time</a>.
</p>
<a name="IDX88"></a>
<a name="IDX89"></a>
<p>If you are going to build the Exim monitor, a similar configuration process is
required. The file &lsquo;<tt>exim_monitor/EDITME</tt>&rsquo; must be edited appropriately for
your installation and saved under the name &lsquo;<tt>Local/eximon.conf</tt>&rsquo;. If you are
happy with the default settings described in &lsquo;<tt>exim_monitor/EDITME</tt>&rsquo;,
&lsquo;<tt>Local/eximon.conf</tt>&rsquo; can be empty, but it must exist.
</p>
<p>This is all the configuration that is needed in straightforward cases for known
operating systems. However, the building process is set up so that it is easy
to override options that are set by default or by operating-system-specific
configuration files, for example to change the name of the C compiler, which
defaults to <code>gcc</code>. See section <a href="#SEC42">Overriding build-time options for Exim</a> below for details of how to
do this.
</p>
<hr size="6">
<a name="Support-for-iconv_005b_005d"></a>
<a name="SEC36"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC35" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC37" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.5 Support for iconv() </h2>

<p>The contents of header lines in messages may be encoded according to the rules
described RFC 2047. This makes it possible to transmit characters that are not
in the ASCII character set, and to label them as being in a particular
character set. When Exim is inspecting header lines by means of the <code>$h_</code>
mechanism, it decodes them, and translates them into a specified character set
(default ISO-8859-1). The translation is possible only if the operating system
supports the <code>iconv()</code> function.
</p>
<p>However, some of the operating systems that supply <code>iconv()</code> do not support
very many conversions. The GNU <code>libiconv</code> library (available from
<strong><a href="http://www.gnu.org/software/libiconv/">http://www.gnu.org/software/libiconv/</a></strong>) can be installed on such
systems to remedy this deficiency, as well as on systems that do not supply
<code>iconv()</code> at all. After installing <code>libiconv</code>, you should add
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">HAVE_ICONV=yes
</pre></td></tr></table>

<p>to your &lsquo;<tt>Local/Makefile</tt>&rsquo; and rebuild Exim.
</p>
<hr size="6">
<a name="Including-TLS_002fSSL-encryption-support"></a>
<a name="SEC37"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC36" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC38" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.6 Including TLS/SSL encryption support </h2>

<p>Exim can be built to support encrypted SMTP connections, using the STARTTLS
command as per RFC 2487. It can also support legacy clients that expect to
start a TLS session immediately on connection to a non-standard port (see the
<code>tls_on_connect_ports</code> runtime option and the <code>-tls-on-connect</code> command
line option).
</p>
<p>If you want to build Exim with TLS support, you must first install either the
OpenSSL or GnuTLS library. There is no cryptographic code in Exim itself for
implementing SSL.
</p>
<p>If OpenSSL is installed, you should set
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">SUPPORT_TLS=yes
TLS_LIBS=-lssl -lcrypto
</pre></td></tr></table>

<p>in &lsquo;<tt>Local/Makefile</tt>&rsquo;. You may also need to specify the locations of the
OpenSSL library and include files. For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">SUPPORT_TLS=yes
TLS_LIBS=-L/usr/local/openssl/lib -lssl -lcrypto
TLS_INCLUDE=-I/usr/local/openssl/include/
</pre></td></tr></table>

<a name="IDX90"></a>
<p>If GnuTLS is installed, you should set
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">SUPPORT_TLS=yes
USE_GNUTLS=yes
TLS_LIBS=-lgnutls -ltasn1 -lgcrypt
</pre></td></tr></table>

<p>in &lsquo;<tt>Local/Makefile</tt>&rsquo;, and again you may need to specify the locations of the
library and include files. For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">SUPPORT_TLS=yes
USE_GNUTLS=yes
TLS_LIBS=-L/usr/gnu/lib -lgnutls -ltasn1 -lgcrypt
TLS_INCLUDE=-I/usr/gnu/include
</pre></td></tr></table>

<p>You do not need to set TLS_INCLUDE if the relevant directory is already
specified in INCLUDE. Details of how to configure Exim to make use of TLS are
given in chapter <a href="spec_39.html#SEC294">Encrypted SMTP connections using TLS/SSL</a>.
</p>
<hr size="6">
<a name="Use-of-tcpwrappers"></a>
<a name="SEC38"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC37" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC39" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.7 Use of tcpwrappers </h2>

<p>Exim can be linked with the <em>tcpwrappers</em> library in order to check incoming
SMTP calls using the <em>tcpwrappers</em> control files. This may be a convenient
alternative to Exim's own checking facilities for installations that are
already making use of <em>tcpwrappers</em> for other purposes. To do this, you
should set USE_TCP_WRAPPERS in &lsquo;<tt>Local/Makefile</tt>&rsquo;, arrange for the file
&lsquo;<tt>tcpd.h</tt>&rsquo; to be available at compile time, and also ensure that the library
&lsquo;<tt>libwrap.a</tt>&rsquo; is available at link time, typically by including <code>-lwrap</code> in
EXTRALIBS_EXIM. For example, if <em>tcpwrappers</em> is installed in &lsquo;<tt>/usr/local</tt>&rsquo;,
you might have
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">USE_TCP_WRAPPERS=yes
CFLAGS=-O -I/usr/local/include
EXTRALIBS_EXIM=-L/usr/local/lib -lwrap
</pre></td></tr></table>

<p>in &lsquo;<tt>Local/Makefile</tt>&rsquo;. The name to use in the <em>tcpwrappers</em> control files is
&quot;exim&quot;. For example, the line
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">exim : LOCAL  192.168.1.  .friendly.domain.example
</pre></td></tr></table>

<p>in your &lsquo;<tt>/etc/hosts.allow</tt>&rsquo; file allows connections from the local host, from
the subnet 192.168.1.0/24, and from all hosts in <em>friendly.domain.example</em>.
All other connections are denied. Consult the <em>tcpwrappers</em> documentation for
further details.
</p>
<hr size="6">
<a name="Including-support-for-IPv6"></a>
<a name="SEC39"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC38" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC40" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.8 Including support for IPv6 </h2>

<p>Exim contains code for use on systems that have IPv6 support. Setting
&lsquo;<samp>HAVE_IPV6=YES</samp>&rsquo; in &lsquo;<tt>Local/Makefile</tt>&rsquo; causes the IPv6 code to be included;
it may also be necessary to set IPV6_INCLUDE and IPV6_LIBS on systems
where the IPv6 support is not fully integrated into the normal include and
library files.
</p>
<p>Two different types of DNS record for handling IPv6 addresses have been
defined. AAAA records (analogous to A records for IPv4) are in use, and are
currently seen as the mainstream. Another record type called A6 was proposed
as better than AAAA because it had more flexibility. However, it was felt to be
over-complex, and its status was reduced to &quot;experimental&quot;. It is not known
if anyone is actually using A6 records. Exim has support for A6 records, but
this is included only if you set &lsquo;<samp>SUPPORT_A6=YES</samp>&rsquo; in &lsquo;<tt>Local/Makefile</tt>&rsquo;. The
support has not been tested for some time.
</p>
<hr size="6">
<a name="The-building-process"></a>
<a name="SEC40"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC39" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC41" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.9 The building process </h2>

<p>Once &lsquo;<tt>Local/Makefile</tt>&rsquo; (and &lsquo;<tt>Local/eximon.conf</tt>&rsquo;, if required) have been
created, run <em>make</em> at the top level. It determines the architecture and
operating system types, and creates a build directory if one does not exist.
For example, on a Sun system running Solaris 8, the directory
&lsquo;<tt>build-SunOS5-5.8-sparc</tt>&rsquo; is created.
<a name="IDX91"></a>
Symbolic links to relevant source files are installed in the build directory.
</p>
<p><strong>Warning</strong>: The <code>-j</code> (parallel) flag must not be used with <em>make</em>; the
building process fails if it is set.
</p>
<p>If this is the first time <em>make</em> has been run, it calls a script that builds
a make file inside the build directory, using the configuration files from the
&lsquo;<tt>Local</tt>&rsquo; directory. The new make file is then passed to another instance of
<em>make</em>. This does the real work, building a number of utility scripts, and
then compiling and linking the binaries for the Exim monitor (if configured), a
number of utility programs, and finally Exim itself. The command &lsquo;<samp>make
makefile</samp>&rsquo; can be used to force a rebuild of the make file in the build
directory, should this ever be necessary.
</p>
<p>If you have problems building Exim, check for any comments there may be in the
&lsquo;<tt>README</tt>&rsquo; file concerning your operating system, and also take a look at the
FAQ, where some common problems are covered.
</p>
<hr size="6">
<a name="Output-from-_0022make_0022"></a>
<a name="SEC41"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC40" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC42" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.10 Output from &quot;make&quot; </h2>

<p>The output produced by the <em>make</em> process for compile lines is often very
unreadable, because these lines can be very long. For this reason, the normal
output is suppressed by default, and instead output similar to that which
appears when compiling the 2.6 Linux kernel is generated: just a short line for
each module that is being compiled or linked. However, it is still possible to
get the full output, by calling <em>make</em> like this:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">FULLECHO='' make -e
</pre></td></tr></table>

<p>The value of FULLECHO defaults to &quot;@&quot;, the flag character that suppresses
command reflection in <em>make</em>. When you ask for the full output, it is
given in addition to the short output.
</p>
<hr size="6">
<a name="Overriding-build_002dtime-options-for-Exim"></a>
<a name="SEC42"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC41" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC43" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.11 Overriding build-time options for Exim </h2>

<p>The main make file that is created at the beginning of the building process
consists of the concatenation of a number of files which set configuration
values, followed by a fixed set of <em>make</em> instructions. If a value is set
more than once, the last setting overrides any previous ones. This provides a
convenient way of overriding defaults. The files that are concatenated are, in
order:
</p>
<table><tr><td>&nbsp;</td><td><pre class="display">OS/Makefile-Default
OS/Makefile-&lt;ostype&gt;
Local/Makefile
Local/Makefile-&lt;ostype&gt;
Local/Makefile-&lt;archtype&gt;
Local/Makefile-&lt;ostype&gt;-&lt;archtype&gt;
OS/Makefile-Base
</pre></td></tr></table>

<a name="IDX92"></a>
<a name="IDX93"></a>
<a name="IDX94"></a>
<p>where &lt;<em>ostype</em>&gt; is the operating system type and &lt;<em>archtype</em>&gt; is the
architecture type. &lsquo;<tt>Local/Makefile</tt>&rsquo; is required to exist, and the building
process fails if it is absent. The other three &lsquo;<tt>Local</tt>&rsquo; files are optional,
and are often not needed.
</p>
<p>The values used for &lt;<em>ostype</em>&gt; and &lt;<em>archtype</em>&gt; are obtained from scripts
called &lsquo;<tt>scripts/os-type</tt>&rsquo; and &lsquo;<tt>scripts/arch-type</tt>&rsquo; respectively. If either of
the environment variables EXIM_OSTYPE or EXIM_ARCHTYPE is set, their
values are used, thereby providing a means of forcing particular settings.
Otherwise, the scripts try to get values from the <code>uname</code> command. If this
fails, the shell variables OSTYPE and ARCHTYPE are inspected. A number
of <em>ad hoc</em> transformations are then applied, to produce the standard names
that Exim expects. You can run these scripts directly from the shell in order
to find out what values are being used on your system.
</p>
<p>&lsquo;<tt>OS/Makefile-Default</tt>&rsquo; contains comments about the variables that are set
therein. Some (but not all) are mentioned below. If there is something that
needs changing, review the contents of this file and the contents of the make
file for your operating system (&lsquo;<tt>OS/Makefile-&lt;ostype&gt;</tt>&rsquo;) to see what the
default values are.
</p>
<a name="IDX95"></a>
<p>If you need to change any of the values that are set in &lsquo;<tt>OS/Makefile-Default</tt>&rsquo;
or in &lsquo;<tt>OS/Makefile-&lt;ostype&gt;</tt>&rsquo;, or to add any new definitions, you do not
need to change the original files. Instead, you should make the changes by
putting the new values in an appropriate &lsquo;<tt>Local</tt>&rsquo; file. For example,
<a name="IDX96"></a>
when building Exim in many releases of the Tru64-Unix (formerly Digital UNIX,
formerly DEC-OSF1) operating system, it is necessary to specify that the C
compiler is called <em>cc</em> rather than <em>gcc</em>. Also, the compiler must be
called with the option <code>-std1</code>, to make it recognize some of the features of
Standard C that Exim uses. (Most other compilers recognize Standard C by
default.) To do this, you should create a file called &lsquo;<tt>Local/Makefile-OSF1</tt>&rsquo;
containing the lines
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">CC=cc
CFLAGS=-std1
</pre></td></tr></table>

<p>If you are compiling for just one operating system, it may be easier to put
these lines directly into &lsquo;<tt>Local/Makefile</tt>&rsquo;.
</p>
<p>Keeping all your local configuration settings separate from the distributed
files makes it easy to transfer them to new versions of Exim simply by copying
the contents of the &lsquo;<tt>Local</tt>&rsquo; directory.
</p>
<a name="IDX97"></a>
<a name="IDX98"></a>
<a name="IDX99"></a>
<a name="IDX100"></a>
<p>Exim contains support for doing LDAP, NIS, NIS+, and other kinds of file
lookup, but not all systems have these components installed, so the default is
not to include the relevant code in the binary. All the different kinds of file
and database lookup that Exim supports are implemented as separate code modules
which are included only if the relevant compile-time options are set. In the
case of LDAP, NIS, and NIS+, the settings for &lsquo;<tt>Local/Makefile</tt>&rsquo; are:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">LOOKUP_LDAP=yes
LOOKUP_NIS=yes
LOOKUP_NISPLUS=yes
</pre></td></tr></table>

<p>and similar settings apply to the other lookup types. They are all listed in
&lsquo;<tt>src/EDITME</tt>&rsquo;. In many cases the relevant include files and interface
libraries need to be installed before compiling Exim.
<a name="IDX101"></a>
However, there are some optional lookup types (such as cdb) for which
the code is entirely contained within Exim, and no external include
files or libraries are required. When a lookup type is not included in the
binary, attempts to configure Exim to use it cause run time configuration
errors.
</p>
<a name="IDX102"></a>
<p>Exim can be linked with an embedded Perl interpreter, allowing Perl
subroutines to be called during string expansion. To enable this facility,
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">EXIM_PERL=perl.o
</pre></td></tr></table>

<p>must be defined in &lsquo;<tt>Local/Makefile</tt>&rsquo;. Details of this facility are given in
chapter <a href="spec_12.html#SEC147">Embedded Perl</a>.
</p>
<a name="IDX103"></a>
<p>The location of the X11 libraries is something that varies a lot between
operating systems, and there may be different versions of X11 to cope
with. Exim itself makes no use of X11, but if you are compiling the Exim
monitor, the X11 libraries must be available.
The following three variables are set in &lsquo;<tt>OS/Makefile-Default</tt>&rsquo;:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">X11=/usr/X11R6
XINCLUDE=-I$(X11)/include
XLFLAGS=-L$(X11)/lib
</pre></td></tr></table>

<p>These are overridden in some of the operating-system configuration files. For
example, in &lsquo;<tt>OS/Makefile-SunOS5</tt>&rsquo; there is
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">X11=/usr/openwin
XINCLUDE=-I$(X11)/include
XLFLAGS=-L$(X11)/lib -R$(X11)/lib
</pre></td></tr></table>

<p>If you need to override the default setting for your operating system, place a
definition of all three of these variables into your
&lsquo;<tt>Local/Makefile-&lt;ostype&gt;</tt>&rsquo; file.
</p>
<a name="IDX104"></a>
<p>If you need to add any extra libraries to the link steps, these can be put in a
variable called EXTRALIBS, which appears in all the link commands, but by
default is not defined. In contrast, EXTRALIBS_EXIM is used only on the
command for linking the main Exim binary, and not for any associated utilities.
</p>
<a name="IDX105"></a>
<p>There is also DBMLIB, which appears in the link commands for binaries that
use DBM functions (see also section <a href="#SEC34">DBM libraries</a>). Finally, there is
EXTRALIBS_EXIMON, which appears only in the link step for the Exim monitor
binary, and which can be used, for example, to include additional X11
libraries.
</p>
<a name="IDX106"></a>
<p>The make file copes with rebuilding Exim correctly if any of the configuration
files are edited. However, if an optional configuration file is deleted, it is
necessary to touch the associated non-optional file (that is,
&lsquo;<tt>Local/Makefile</tt>&rsquo; or &lsquo;<tt>Local/eximon.conf</tt>&rsquo;) before rebuilding.
</p>
<hr size="6">
<a name="OS_002dspecific-header-files"></a>
<a name="SEC43"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC42" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC44" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.12 OS-specific header files </h2>

<p>The &lsquo;<tt>OS</tt>&rsquo; directory contains a number of files with names of the form
&lsquo;<tt>os.h-&lt;ostype&gt;</tt>&rsquo;. These are system-specific C header files that should not
normally need to be changed. There is a list of macro settings that are
recognized in the file &lsquo;<tt>OS/os.configuring</tt>&rsquo;, which should be consulted if you
are porting Exim to a new operating system.
</p>
<hr size="6">
<a name="Overriding-build_002dtime-options-for-the-monitor"></a>
<a name="SEC44"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC43" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC45" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.13 Overriding build-time options for the monitor </h2>

<p>A similar process is used for overriding things when building the Exim monitor,
where the files that are involved are
</p>
<table><tr><td>&nbsp;</td><td><pre class="display">OS/eximon.conf-Default
OS/eximon.conf-&lt;ostype&gt;
Local/eximon.conf
Local/eximon.conf-&lt;ostype&gt;
Local/eximon.conf-&lt;archtype&gt;
Local/eximon.conf-&lt;ostype&gt;-&lt;archtype&gt;
</pre></td></tr></table>

<a name="IDX107"></a>
<p>As with Exim itself, the final three files need not exist, and in this case the
&lsquo;<tt>OS/eximon.conf-&lt;ostype&gt;</tt>&rsquo; file is also optional. The default values in
&lsquo;<tt>OS/eximon.conf-Default</tt>&rsquo; can be overridden dynamically by setting environment
variables of the same name, preceded by EXIMON_. For example, setting
EXIMON_LOG_DEPTH in the environment overrides the value of
LOG_DEPTH at run time.
<a name="IDX108"></a>
</p>
<hr size="6">
<a name="Installing-Exim-binaries-and-scripts"></a>
<a name="SEC45"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC44" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC46" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.14 Installing Exim binaries and scripts </h2>

<p>The command &lsquo;<samp>make install</samp>&rsquo; runs the <code>exim_install</code> script with no
arguments. The script copies binaries and utility scripts into the directory
whose name is specified by the BIN_DIRECTORY setting in &lsquo;<tt>Local/Makefile</tt>&rsquo;.
<a name="IDX109"></a>
The install script copies files only if they are newer than the files they are
going to replace. The Exim binary is required to be owned by root and have the
<em>setuid</em> bit set, for normal configurations. Therefore, you must run &lsquo;<samp>make
install</samp>&rsquo; as root so that it can set up the Exim binary in this way. However, in
some special situations (for example, if a host is doing no local deliveries)
it may be possible to run Exim without making the binary setuid root (see
chapter <a href="spec_52.html#SEC475">Security considerations</a> for details).
</p>
<a name="IDX110"></a>
<p>Exim's run time configuration file is named by the CONFIGURE_FILE setting
in &lsquo;<tt>Local/Makefile</tt>&rsquo;. If this names a single file, and the file does not
exist, the default configuration file &lsquo;<tt>src/configure.default</tt>&rsquo; is copied there
by the installation script. If a run time configuration file already exists, it
is left alone. If CONFIGURE_FILE is a colon-separated list, naming several
alternative files, no default is installed.
</p>
<a name="IDX111"></a>
<a name="IDX112"></a>
<p>One change is made to the default configuration file when it is installed: the
default configuration contains a router that references a system aliases file.
The path to this file is set to the value specified by
SYSTEM_ALIASES_FILE in &lsquo;<tt>Local/Makefile</tt>&rsquo; (&lsquo;<tt>/etc/aliases</tt>&rsquo; by default).
If the system aliases file does not exist, the installation script creates it,
and outputs a comment to the user.
</p>
<p>The created file contains no aliases, but it does contain comments about the
aliases a site should normally have. Mail aliases have traditionally been
kept in &lsquo;<tt>/etc/aliases</tt>&rsquo;. However, some operating systems are now using
&lsquo;<tt>/etc/mail/aliases</tt>&rsquo;. You should check if yours is one of these, and change
Exim's configuration if necessary.
</p>
<p>The default configuration uses the local host's name as the only local domain,
and is set up to do local deliveries into the shared directory &lsquo;<tt>/var/mail</tt>&rsquo;,
running as the local user. System aliases and &lsquo;<tt>.forward</tt>&rsquo; files in users' home
directories are supported, but no NIS or NIS+ support is configured. Domains
other than the name of the local host are routed using the DNS, with delivery
over SMTP.
</p>
<p>It is possible to install Exim for special purposes (such as building a binary
distribution) in a private part of the file system. You can do this by a
command such as
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">make DESTDIR=/some/directory/ install
</pre></td></tr></table>

<p>This has the effect of pre-pending the specified directory to all the file
paths, except the name of the system aliases file that appears in the default
configuration. (If a default alias file is created, its name <em>is</em> modified.)
For backwards compatibility, ROOT is used if DESTDIR is not set,
but this usage is deprecated.
</p>
<a name="IDX113"></a>
<p>Running <em>make install</em> does not copy the Exim 4 conversion script
<em>convert4r4</em>, or the <em>pcretest</em> test program. You will probably run the
first of these only once (if you are upgrading from Exim 3), and the second
isn't really part of Exim. None of the documentation files in the &lsquo;<tt>doc</tt>&rsquo;
directory are copied, except for the info files when you have set
INFO_DIRECTORY, as described in section <a href="#SEC46">Installing info documentation</a> below.
</p>
<p>For the utility programs, old versions are renamed by adding the suffix &lsquo;<tt>.O</tt>&rsquo;
to their names. The Exim binary itself, however, is handled differently. It is
installed under a name that includes the version number and the compile number,
for example &lsquo;<tt>exim-4.69-1</tt>&rsquo;. The script then arranges for a symbolic link
called &lsquo;<tt>exim</tt>&rsquo; to point to the binary. If you are updating a previous version
of Exim, the script takes care to ensure that the name &lsquo;<tt>exim</tt>&rsquo; is never absent
from the directory (as seen by other processes).
</p>
<a name="IDX114"></a>
<p>If you want to see what the <em>make install</em> will do before running it for
real, you can pass the <code>-n</code> option to the installation script by this
command:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">make INSTALL_ARG=-n install
</pre></td></tr></table>

<p>The contents of the variable INSTALL_ARG are passed to the installation
script. You do not need to be root to run this test. Alternatively, you can run
the installation script directly, but this must be from within the build
directory. For example, from the top-level Exim directory you could use this
command:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">(cd build-SunOS5-5.5.1-sparc; ../scripts/exim_install -n)
</pre></td></tr></table>

<a name="IDX115"></a>
<p>There are two other options that can be supplied to the installation script.
</p>
<ul class="toc">
<li>
<code>-no_chown</code> bypasses the call to change the owner of the installed binary
to root, and the call to make it a setuid binary.

</li><li>
<code>-no_symlink</code> bypasses the setting up of the symbolic link &lsquo;<tt>exim</tt>&rsquo; to the
installed binary.
</li></ul>

<p>INSTALL_ARG can be used to pass these options to the script. For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">make INSTALL_ARG=-no_symlink install
</pre></td></tr></table>

<p>The installation script can also be given arguments specifying which files are
to be copied. For example, to install just the Exim binary, and nothing else,
without creating the symbolic link, you could use:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">make INSTALL_ARG='-no_symlink exim' install
</pre></td></tr></table>

<hr size="6">
<a name="Installing-info-documentation"></a>
<a name="SEC46"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC45" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC47" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.15 Installing info documentation </h2>

<p>Not all systems use the GNU <em>info</em> system for documentation, and for this
reason, the Texinfo source of Exim's documentation is not included in the main
distribution. Instead it is available separately from the ftp site (see section
<a href="spec_1.html#SEC7">Where to find the Exim distribution</a>).
</p>
<p>If you have defined INFO_DIRECTORY in &lsquo;<tt>Local/Makefile</tt>&rsquo; and the Texinfo
source of the documentation is found in the source tree, running &lsquo;<samp>make
install</samp>&rsquo; automatically builds the info files and installs them.
</p>
<hr size="6">
<a name="Setting-up-the-spool-directory"></a>
<a name="SEC47"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC46" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC48" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.16 Setting up the spool directory </h2>

<p>When it starts up, Exim tries to create its spool directory if it does not
exist. The Exim uid and gid are used for the owner and group of the spool
directory. Sub-directories are automatically created in the spool directory as
necessary.
</p>
<hr size="6">
<a name="Testing"></a>
<a name="SEC48"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC47" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC49" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.17 Testing </h2>

<p>Having installed Exim, you can check that the run time configuration file is
syntactically valid by running the following command, which assumes that the
Exim binary directory is within your PATH environment variable:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">exim -bV
</pre></td></tr></table>

<p>If there are any errors in the configuration file, Exim outputs error messages.
Otherwise it outputs the version number and build date,
the DBM library that is being used, and information about which drivers and
other optional code modules are included in the binary.
Some simple routing tests can be done by using the address testing option. For
example,
</p>
<table><tr><td>&nbsp;</td><td><pre class="display">exim -bt &lt;local username&gt;
</pre></td></tr></table>

<p>should verify that it recognizes a local mailbox, and
</p>
<table><tr><td>&nbsp;</td><td><pre class="display">exim -bt &lt;remote address&gt;
</pre></td></tr></table>

<p>a remote one. Then try getting it to deliver mail, both locally and remotely.
This can be done by passing messages directly to Exim, without going through a
user agent. For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">exim -v postmaster@your.domain.example
From: user@your.domain.example
To: postmaster@your.domain.example
Subject: Testing Exim

This is a test message.
^D
</pre></td></tr></table>

<p>The <code>-v</code> option causes Exim to output some verification of what it is doing.
In this case you should see copies of three log lines, one for the message's
arrival, one for its delivery, and one containing &quot;Completed&quot;.
</p>
<a name="IDX116"></a>
<p>If you encounter problems, look at Exim's log files (<em>mainlog</em> and
<em>paniclog</em>) to see if there is any relevant information there. Another source
of information is running Exim with debugging turned on, by specifying the
<code>-d</code> option. If a message is stuck on Exim's spool, you can force a delivery
with debugging turned on by a command of the form
</p>
<table><tr><td>&nbsp;</td><td><pre class="display">exim -d -M &lt;exim-message-id&gt;
</pre></td></tr></table>

<p>You must be root or an &quot;admin user&quot; in order to do this. The <code>-d</code> option
produces rather a lot of output, but you can cut this down to specific areas.
For example, if you use <code>-d-all+route</code> only the debugging information
relevant to routing is included. (See the <code>-d</code> option in chapter
<a href="spec_5.html#SEC52">The Exim command line</a> for more details.)
</p>
<a name="IDX117"></a>
<a name="IDX118"></a>
<p>One specific problem that has shown up on some sites is the inability to do
local deliveries into a shared mailbox directory, because it does not have the
&quot;sticky bit&quot; set on it. By default, Exim tries to create a lock file before
writing to a mailbox file, and if it cannot create the lock file, the delivery
is deferred. You can get round this either by setting the &quot;sticky bit&quot; on the
directory, or by setting a specific group for local deliveries and allowing
that group to create files in the directory (see the comments above the
<code>local_delivery</code> transport in the default configuration file). Another
approach is to configure Exim not to use lock files, but just to rely on
<code>fcntl()</code> locking instead. However, you should do this only if all user
agents also use <code>fcntl()</code> locking. For further discussion of locking issues,
see chapter <a href="spec_26.html#SEC222">The appendfile transport</a>.
</p>
<p>One thing that cannot be tested on a system that is already running an MTA is
the receipt of incoming SMTP mail on the standard SMTP port. However, the
<code>-oX</code> option can be used to run an Exim daemon that listens on some other
port, or <em>inetd</em> can be used to do this. The <code>-bh</code> option and the
<em>exim_checkaccess</em> utility can be used to check out policy controls on
incoming SMTP mail.
</p>
<p>Testing a new version on a system that is already running Exim can most easily
be done by building a binary with a different CONFIGURE_FILE setting. From
within the run time configuration, all other file and directory names
that Exim uses can be altered, in order to keep it entirely clear of the
production version.
</p>
<hr size="6">
<a name="Replacing-another-MTA-with-Exim"></a>
<a name="SEC49"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC48" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC50" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.18 Replacing another MTA with Exim </h2>

<p>Building and installing Exim for the first time does not of itself put it in
general use. The name by which the system's MTA is called by mail user agents
is either &lsquo;<tt>/usr/sbin/sendmail</tt>&rsquo;, or &lsquo;<tt>/usr/lib/sendmail</tt>&rsquo; (depending on the
operating system), and it is necessary to make this name point to the <em>exim</em>
binary in order to get the user agents to pass messages to Exim. This is
normally done by renaming any existing file and making &lsquo;<tt>/usr/sbin/sendmail</tt>&rsquo;
or &lsquo;<tt>/usr/lib/sendmail</tt>&rsquo;
<a name="IDX119"></a>
a symbolic link to the <em>exim</em> binary. It is a good idea to remove any setuid
privilege and executable status from the old MTA. It is then necessary to stop
and restart the mailer daemon, if one is running.
</p>
<a name="IDX120"></a>
<a name="IDX121"></a>
<p>Some operating systems have introduced alternative ways of switching MTAs. For
example, if you are running FreeBSD, you need to edit the file
&lsquo;<tt>/etc/mail/mailer.conf</tt>&rsquo; instead of setting up a symbolic link as just
described. A typical example of the contents of this file for running Exim is
as follows:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">sendmail            /usr/exim/bin/exim
send-mail           /usr/exim/bin/exim
mailq               /usr/exim/bin/exim -bp
newaliases          /usr/bin/true
</pre></td></tr></table>

<p>Once you have set up the symbolic link, or edited &lsquo;<tt>/etc/mail/mailer.conf</tt>&rsquo;,
your Exim installation is &quot;live&quot;. Check it by sending a message from your
favourite user agent.
</p>
<p>You should consider what to tell your users about the change of MTA. Exim may
have different capabilities to what was previously running, and there are
various operational differences such as the text of messages produced by
command line options and in bounce messages. If you allow your users to make
use of Exim's filtering capabilities, you should make the document entitled
<em>Exim's interface to mail filtering</em> available to them.
</p>
<hr size="6">
<a name="Upgrading-Exim"></a>
<a name="SEC50"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC49" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC51" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.19 Upgrading Exim </h2>

<p>If you are already running Exim on your host, building and installing a new
version automatically makes it available to MUAs, or any other programs that
call the MTA directly. However, if you are running an Exim daemon, you do need
to send it a HUP signal, to make it re-execute itself, and thereby pick up the
new binary. You do not need to stop processing mail in order to install a new
version of Exim. The install script does not modify an existing runtime
configuration file.
</p>
<hr size="6">
<a name="Stopping-the-Exim-daemon-on-Solaris"></a>
<a name="SEC51"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC50" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC31" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 4.20 Stopping the Exim daemon on Solaris </h2>

<p>The standard command for stopping the mailer daemon on Solaris is
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">/etc/init.d/sendmail stop
</pre></td></tr></table>

<p>If &lsquo;<tt>/usr/lib/sendmail</tt>&rsquo; has been turned into a symbolic link, this script
fails to stop Exim because it uses the command <em>ps -e</em> and greps the output
for the text &quot;sendmail&quot;; this is not present because the actual program name
(that is, &quot;exim&quot;) is given by the <em>ps</em> command with these options. A
solution is to replace the line that finds the process id with something like
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">pid=`cat /var/spool/exim/exim-daemon.pid`
</pre></td></tr></table>

<p>to obtain the daemon's pid directly from the file that Exim saves it in.
</p>
<p>Note, however, that stopping the daemon does not &quot;stop Exim&quot;. Messages can
still be received from local processes, and if automatic delivery is configured
(the normal case), deliveries will still occur.
</p>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC31" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_5.html#SEC52" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated on <i>September, 10 2009</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.78</i></a>.
 </font>
 <br>

</p>
</body>
</html>