The Exim FAQ

Contents   Previous   Next

1. BUILDING AND INSTALLING

Q0101:  I'm having a problem with an Exim RPM.

A0101:  Normally the thing to do if you have a problem with an RPM package is to contact the person who built the package first, not the person who made the software that's in the package. You can usually find out who made a package using the following command:

   rpm --query --package --queryformat '%{PACKAGER}\n' <rpm-package-file>

where <rpm-package-file> is the actual file, e.g. exim-3.03-2.i386.rpm. Or, if the package is installed on your system:

   rpm --query --queryformat '%{PACKAGER}\n' <package-name>

where <package-name> is the name component of the package, e.g. exim. If the packager is unable or unwilling to help, only then should you contact the actual author or associated mailing list of the software.

If you discover through the querying process that you can't tell who the person (or company or group) is who built the package, or that they no longer exist at the given address, then you should reconsider whether you want a package from an unknown source on your system.

If you discover through the querying process that you yourself are the person who built the package, then you should either (a) contact the author or associated mailing list, or (b) reconsider whether you ought to be building and distributing RPM packages of software you don't understand.

Similar rules of thumb govern other binary package formats, including debs, tarballs, and POSIX packages.

Q0102:  I can't get Exim to compile with Berkeley DB version 2.x or 3.x.

A0102:  Have you set "USE_DB=yes" in Local/Makefile? This causes Exim to use the native interface to the DBM library instead of the compatibility interface, which needs a header called ndbm.h that may not exist on your system.

Q0103:  I'm getting an undefined symbol error for hosts_ctl when I try to build Exim. (On some systems this error is undefined reference to 'hosts_ctl'.)

A0103:  You should either remove the definition of USE_TCP_WRAPPERS or add -lwrap to your EXTRALIBS setting in Local/Makefile.

Q0104:  I'm about to upgrade to a new Exim release. Do I need to ensure the spool is empty, or take any other special action?

A0104:  It depends on where you are coming from.

(1)  If you are changing to release 4.00 or later from a release prior to 4.00, you will need to make changes to the run time configuration file. See the file doc/Exim4.upgrade for details. If you are coming from before release 3.00, you should also see doc/Exim3.upgrade.

(2)  If you are upgrading from an Exim 4 release to a later release, you do not need to take special action. New releases are made backwards compatible with old spool files and hints databases, so that upgrading can be done on a running system. All that should be necessary is to install a new binary and then HUP the daemon.

Q0105:  What does the error install-info: command not found mean?

A0105:  You have set INFO_DIRECTORY in your Local/Makefile, and Exim is trying to install the Texinfo documentation, but cannot find the command called install-info. If you have a version of Texinfo prior to 3.9, you should upgrade. Otherwise, check your installation of Texinfo to see why the install-info command is not available.

Q0106:  Exim doesn't seem to be recognizing my operating system type correctly, and so is failing to build.

A0106:  Run the command scripts/os-type -generic. The output should be one of the known OS types, and should correspond to your operating system. You can see which OS are supported by obeying ls OS/Makefile-* and looking at the file name suffixes.

If there is a discrepancy, it means that the script is failing to interpret the output from the uname command correctly, or that the output is wrong. Meanwhile, you can build Exim by obeying

   EXIM_OSTYPE=xxxx make

instead of just make, provided you are running a Bourne-compatible shell, or otherwise by setting EXIM_OSTYPE correctly in your environment. It is probably best to start again from a clean distribution, to avoid any wreckage left over from the failed attempt.

Q0107:  Exim fails to build, complaining about the absence of the killpg function.

A0107:  This function should be present in all modern flavours of Unix. If you are using an older version, you should be able to get round the problem by inserting

   #define killpg(pgid,sig)   kill(-(pgid),sig)

into the file called OS/os.h-xxx, where xxx identifies your operating system, and is the output of the command scripts/os-type -generic.

Q0108:  I'm getting an unresolved symbol ldap_is_ldap_url when trying to build Exim.

A0108:  You must have specified LOOKUP_LDAP=yes in the configuration. Have you remembered to set -lldap somewhere (e.g. in LOOKUP_LIBS)? You need that in order to get the LDAP library scanned when linking.

Q0109:  I'm getting an unresolved symbol mysql_close when trying to build Exim.

A0109:  You must have specified LOOKUP_MYSQL=yes in the configuration. Have you remembered to set -lmysqlclient somewhere (e.g. in LOOKUP_LIBS)? You need that in order to get the MySQL library scanned when linking.

Q0110:  I'm trying to build Exim with PAM support. I have included -lpam in EXTRALIBS, but I'm still getting a linking error:

   /lib/libpam.so: undefined reference to `dlerror'
   /lib/libpam.so: undefined reference to `dlclose'
   /lib/libpam.so: undefined reference to `dlopen'
   /lib/libpam.so: undefined reference to `dlsym'

A0110:  Add -ldl to EXTRALIBS. In some systems these dynamic loading functions are in their own library.

Q0111:  I'm getting the error db.h: No such file or directory when I try to build Exim.

A0111:  This problem has been seen with RedHat 7.0, but could also happen in other environments. If your system is using the DB library, you need to install the DB development package in order to build Exim. The package is called something like db3-devel-3.1.14-16.i386.rpm for Linux systems, but you should check which version of DB you have installed (current releases are DB 4).

Q0112:  I'm getting the error /usr/bin/ld: cannot find -ldb when I try to build Exim.

A0112:  This is probably the same problem as Q0111.

Q0113:  I've compiled Exim and I've managed to start it but there was one problem - it always complained that libmsqlclient.so.10 was not found, even though this file is in /usr/local/lib/mysql/.

A0113:  Solaris: ensure you have this in your Local/Makefile:

   LOOKUP_LIBS=-L/usr/local/lib/mysql -R/usr/local/lib/mysql

Net/Open/FreeBSD: Run this command (or ensure it gets run automatically at boot time):

   ldconfig -m /usr/local/lib/mysql

Linux: add /usr/local/lib/mysql to /etc/ld.so.conf and re-run ldconfig. Alternatively, add

   -Wl,-rpath -Wl,/usr/local/lib/mysql

to EXTRA_LIBS and then re-link (this is similar to the Solaris solution above). This will probably also work on other systems that use GNU Binutils.

Q0114:  How can I remove Sendmail from my system? I've built Exim and run make install, but it still doesn't seem to be fully operational.

A0114:  If you are running FreeBSD, see Q9201. Otherwise, you need to arrange that whichever of the paths /usr/sbin/sendmail or /usr/lib/sendmail exists on your system is changed to refer to Exim. For example, you could use these commands (as root):

   mv /usr/sbin/sendmail /usr/sbin/sendmail.original
   chmod u-s /usr/sbin/sendmail.original
   ln -s /path/to/exim /usr/sbin/sendmail

The second command removes the setuid privilege from the old MTA, as a general safety precaution. In the third command, substitute the actual path to the Exim binary for /path/to/exim.

Q0115:  What does Can't open ../scripts/newer: No such file or directory mean? I got it while trying to build Exim.

A0115:  You are using FreeBSD, or another OS that has a make command which tries to optimize the running of commands. Exim's Makefile contains targets with sequential commands like this:

   buildpcre:
     @cd pcre; $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) CC="$(CC)" \
       CFLAGS="$(CFLAGS) $(PCRE_CFLAGS)" \
       RANLIB="$(RANLIB)" HDRS="$(PHDRS)" \
       INCLUDE="$(INCLUDE) $(IPV6_INCLUDE) $(TLS_INCLUDE)"
     @if $(SHELL) $(SCRIPTS)/newer pcre/libpcre.a exim; then \
       /bin/rm -f exim eximon.bin; fi

The second command assumes that the cd pcre in the first command is no longer in effect. If you have -j3 in your default set of MAKEFLAGS, FreeBSD make tries to optimize, and ends up up with both commands in the same shell process. The result is that $(SCRIPTS) (which has a value of ../scripts) is not found.

The simplest solution is to force make to use backwards compatibility mode with each command in its own shell, by using the -B flag. To ensure that this happens throughout the build, it's best to export it in your environment:

 	 MAKEFLAGS='-B'
	 export MAKEFLAGS
	 make

Q0116:  I have tried to build Exim with Berkeley DB 3 and 4, but I always get errors.

A0116:  One common problem, especially when you have several different versions of BDB installed on the same host, is that the header files and library files for BDB are not in a standard place. You therefore need to tell Exim where they are, by setting INCLUDE and DBMLIB in your Local/Makefile. For example, I use this on my workstation when I want to build with DB 4.1:

   INCLUDE=-I/opt/local/include/db-4.1
   DBMLIB=/opt/local/lib/db-4.1/libdb.a

Specifying the complete library file like this will cause it to be statically linked with Exim. You'll have to check to see where these files are on your system. For example, on FreeBSD 5, the header is in /usr/local/include/db4 and the library is in /usr/local/lib and called libdb4. In that environment, you could use:

   INCLUDE=-I/usr/local/include/db4
   DBMLIB=-L/usr/local/lib -ldb4

This time, DBMLIB is specifying the library directory (/usr/local/lib) and the name of the library (db4) separately. The name of the actual library file is /usr/local/lib/libdb4.something. If the library was compiled for dynamic linking, that will be used.

Q0117:  Is there a quick walk-through of an Exim install from source anywhere?

A0117:  Here! This is a contribution from a RedHat user, somewhat edited. On other operating systems things may be slightly different, but the general approach is the same.

(1)  Install the db needed for Exim. This needs to be done first if you don't have a DBM library installed. Go to http://www.sleepycat.com and download db-4.1.25.tar.gz, or whatever the current release is. Then:

   gunzip db-4.1.25.tar.gz
   tar -xvf db-4.1.25.tar
   cd db-4.1.25
   cd build_unix
   ../dist/configure
   make
   make install

(2)  Add a user for use by Exim, unless you want to use an existing user such as mail:

   adduser exim

(3)  Now you can prepare to build Exim. Go to http://www.exim.org or one of its mirrors, or the master ftp site ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4, and download exim-4.20.tar.gz or whatever the current release is. Then:

   gunzip exim-4.20.tar.gz
   tar -xvf exim-4.20.tar
   cd exim-4.20
   cp src/EDITME Local/Makefile
   cp exim_monitor/EDITME Local/eximon.conf

(4)  Edit Local/Makefile:

Comment out EXIM_MONITOR= unless you want to install the Exim monitor (it requires X-windows).

Set the user you want Exim to use for itself:

   EXIM_USER=exim

If your DBM library is Berkeley DB, set up to use its native interface:

   USE_DB=yes

Make sure Exim's build can find the DBM library and its headers. If you've installed Berkeley DB 4 you'll need to have settings like this in Local/Makefile:

   INCLUDE=-I/usr/local/BerkeleyDB.4.1/include
   DBMLIB=/usr/local/BerkeleyDB.4.1/lib/libdb.a

(Check that the first directory contains the db.h file and that the second library exists.)

You don't need to change anything else, but you might want to review the default settings in the “must specify” section.

(4)  Build Exim by running the make command.

(5)  Install Exim by running, as root:

   make install

You must be root to do this. You do not have to be root for any of the previous building activity.

(6)  Run some tests on Exim; see if it will do local and remote deliveries. Change the configuration if necessary (for example, uncommenting group on the local_delivery transport if you don't use a “sticky bit” directory).

(7)  Change Sendmail to Exim (of course you need to have had Sendmail installed to do this).

   /etc/init.d/sendmail stop
   mv /usr/sbin/sendmail /usr/sbin/sendmail.org
   ln -s /usr/exim/bin/exim /usr/sbin/sendmail
   /etc/init.d/sendmail start

(8)  Check the Exim log. Either use the Exim monitor, or:

   tail -f /var/spool/exim/log/mainlog

Q0118:  I've set LOOKUP_INCLUDE=-I/client/include in Local/Makefile, but the compilation of exim_dumpdb is ignoring this option and failing. Why?

A0118:  LOOKUP_INCLUDE is the special include file for lookup modules in Exim (e.g. mysql, LDAP). Confusingly, it doesn't apply to basic DBM code which is used also for other things. Try setting INCLUDE and DBMLIB instead. For example:

   USE_DB=yes
   INCLUDE=-I/client/include
   DBMLIB=/client/lib/libdb.a

Q0119:  I know there are some 3rd-party patches for Exim, for exiscan and other things. Where are they?

A0119:  Exiscan is at http://duncanthrax.net/exiscan-acl/.
Scanexi is at http://w1.231.telia.com/~u23107873/scanexi.html
A sample local_scan() function for interfacing to uvscan is at http://www.dcs.qmul.ac.uk/~mb/local_scan/.
An interface to SpamAssassin at SMTP time is at http://marc.merlins.org/linux/exim/sa.html.
A mini-HOWTO (PDF file) about scanning and virus scanning, and some RPMs can be found at http://www.timj.co.uk/linux/exim.php.



Contents   Previous   Next