Configuring Exim with MySQL lookup support

tjjfv

Registered
Nov 11, 2004
3
0
151

I need to make use of MySQL lookups from within Exim. This requires that the mysqlclient libraries are included during the build of Exim. Thus I need the Makefile that CPanel uses to build exim, so that I can just add the MySQL related lines. Is this available, or are there any other suggestions?

Thanks,

Tom
 
Last edited:

tjjfv

Registered
Nov 11, 2004
3
0
151
chirpy said:
You'll probably need to use the srpms:
http://updates.cpanel.net/pub/exim/
Just what I needed! Thanks!

After getting the CPanel-compatible Source RPM for Exim (from the above location), I copied the 'EDITME' file that was included in the root of the source package, edited it to include MySQL lookups and provided the location of the MySQL include and library paths, and then built and installed. Nothing seems to have stopped working, so thats good; I'll followup once I have confirmed the MySQL lookups are working.

I was somewhat unsure about the other files in the source package, such as the 'antirelay' files and the 'exim-config' files. I assumed that I did not need to do anything with them, as my current installation had come from CPanel, and thus those were already installed properly. Is this correct?

Also, after reviewing the '.patch' files, I assumed that they were only needed if working off of the original Exim source, instead of the CPanel provided Exim source. Is this correct?

Thanks,

Tom
 
Last edited:

terrybenge

Registered
Jun 7, 2006
4
0
151
Where is the source, I can only find RPMS

i need source for CentOS 3.5 i686 to enable mysql exim 4.52-7

Terry
 

terrybenge

Registered
Jun 7, 2006
4
0
151
You are of course correct, couldnt see it for looking.

Now my inability to understand all things linux shows - how do I expand the source RPM so I can edit the files?

Even better - is there a step by step 'How To' for enabling mysql?

Thanks
Terry
 

terrybenge

Registered
Jun 7, 2006
4
0
151
Now I'm a the point where I can do the 'make install'

Problem is, when i install the logs give the following error despite the exim.conf still being the default one and running fine before the install.

server exim: exim shutdown failed Jun 9 07:41:27 server exim: antirelayd shutdown succeeded Jun 9 07:41:27 server exim: spamd shutdown succeeded Jun 9 07:41:27 server exim: 2006-06-09 07:41:27 Exim configuration error for virtual_userdelivery_spam transport: Jun 9 07:41:27 server exim: quota_directory must not be set without "directory" Jun 9 07:41:27 server exim: exim startup failed Jun 9 07:41:27 server exim: 2006-06-09 07:41:27 Exim configuration error for virtual_userdelivery_spam transport: Jun 9 07:41:27 server exim: quota_directory must not be set without "directory" Jun 9 07:41:27 server exim: exim startup failed Jun 9 07:41:27 server exim: antirelayd startup succeeded Jun 9 07:41:28 server exim: spamd startup succeeded exim has failed, please contact the sysadmin.

Even tried reinstalling exim fresh via /scripts/eximup --force
then doing the make install - still get the same error.

These are the details of my default install that works fine:

[email protected] [/eximdistro/exim-4.52]# /scripts/eximup
Exim Setup Script Version 20.0
Fetching version information from http://updates.cpanel.net/eximinstall/version (RELEASE)....Fetching http://updates.cpanel.net/eximinstall/version (0)[email protected]%......Done
Done
This is the exim 4.52 installer release number 7 for platform centos 3.5
exim is up to date. Use eximup --force to force a reinstall
[email protected] [/eximdistro/exim-4.52]#

This is the src file i am working with.
exim-4.52-7_cpanel_smtpctl_av_rewrite_mm2_mmmtrap_exiscan_md5pass.src.rpm

I have mage 3 changes to the makefile that I put in the Local dir:

LOOKUP_MYSQL=yes

LOOKUP_INCLUDE=-I/usr/include/mysql/
LOOKUP_LIBS=-L/usr/lib -L/usr/lib/mysql -lmysqlclient


Am I missing something? Any ideas?
Terry
 

terrybenge

Registered
Jun 7, 2006
4
0
151
Finally solved the issue. It required two patches to be applied the SRC rpm.

exim-4.52-maildir_quota.patch
exim-transport_filter_timeout-4.51.patch

e.g. cd to the directory the src rpm extracted to.

#patch -p1</eximdistro/exim-4.52-maildir_quota.patch
#patch -p1</eximdistro/exim-transport_filter_timeout-4.51.patch


In addition the the folowing lines being to the makefile copied to the Local/ dir of the distro.

LOOKUP_MYSQL=yes

LOOKUP_INCLUDE=-I/usr/include/mysql/
LOOKUP_LIBS=-L/usr/lib -L/usr/lib/mysql -lmysqlclient

NB: You need the mysql library on your server.

_____________________________________
http://www.ansa-me.com Using Autoresponders to sell more to your customers