[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Exim + mysql



ok, it seems to work now. I have followed your advices and I have re-compiled and installed the exim package in order to add the mysql support. 

thx,

frederic.

PS: I post the walkthrough. Hope it will help other newbies :-)



Exim with MySQL support using debian packages
---------------------------------------------

Exim debian package (3.35) is compiled without the
mysql support. Therefore, if you want to use
mysql to store all email addresses, aliases and
maildir reference, you have to reinstall it.

You have different possibilities to do that
like downloading the latest version and removing
the original one, which will cost you a lot
of effort with broken dependencies. Or, you
install both version, wich will be perhaps easier.

The possibility I choose, is to download 
the debian package source, and to recompile it
with other options. It lets you benefit of the
debian specific configuration and all the packages 
facilities.

In order to compile the package, you first
need to install some packages (e.g. using dselect).

	libpcre3-dev, 
	libldap2-dev, 
	libpam0g-dev, 
	libident-dev, 
	libwrap0-dev, 
	libdb2-dev,
	xlibs-dev, 
	libxaw7-dev,
	libmysqlclient10-dev

Then you can get the package source using apt-get 
somewhere in your home directory:

	apt-get source exim

It creates different files and a directory. The
standard exim build options is modified by
debian using a patch file. This is this file that
you can customize.. 

edit exim-3.35/debian/editme-diff and replace the line:

	# LOOKUP_MYSQL=yes 
by 
	-# LOOKUP_MYSQL=yes
	+LOOKUP_MYSQL=yes

and lines
	 # LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include
	-# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq            
	+LOOKUP_LIBS=-lldap -llber
by
	-# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include
	+LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/include/mysql
	-# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq            
	+LOOKUP_LIBS=-lldap -llber -lmysqlclient
 
then, as root, build the package:

	dpkg-buildpackage -uc -b

you can finally install the newly created
debian package :

	cd ..
	dpkg -i exim_3.35-1_i386.deb

Now it should works. 

More info about exim.conf and mysql combination
is available there:
http://www.tty1.net/virtual_domains_en.html




Frederic Dreier.



* This indformation is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. 

Topics (for search engines): exim mysql debian package rebuild build customize 
packages configuration exim.conf dpkg-buildpackage example



-----Original Message-----
From: "David H. Clymer" <david@nittanylink.com>
To: Frederic Dreier <dreif@hta-bi.bfh.ch>
Date: 23 Dec 2002 11:01:28 -0500
Subject: Re: Exim + mysql

> I get problems configuring exim to use mysql. When I add the line in exim.conf:
> hide mysql_servers = localhost/users/admin/secret
>
> I get :
> exim -C ./exim.conf -bV
> Exim version 3.35 #1 built 04-Mar-2002 23:05:40
> Copyright (c) University of Cambridge 2001
> 2002-12-22 17:13:59 Exim configuration error
>   main option "mysql_servers" unknown in line 1
>
> Why that? Is there another solution to get exim to use a db?

the exim deb does not have mysql support. if you want it, you will have
to compile it yourself, I believe. thats what I ended up doing.

davidc








Reply to: