Exim with mysql support

djwoef

New member
Joined
Mar 2, 2008
Messages
3
I want so set up grey listing en black listing within Exim to decrease the amount of incoming spam.

I downloaded the custom build of Exim and it compiles without errors.
But as soon as I want to enable the Mysql lookup feature LOOKUP_MYSQL=yes
I am not able to compile EXIM anymore. I get the following errors. This is weird since I have all the DA special builds of mysql and mysql-devel installed.

gcc mysql.c
mysql.c:41: error: expected specifier-qualifier-list before âMYSQLâ
mysql.c: In function âmysql_tidyâ:
mysql.c:76: error: âmysql_connectionâ has no member named âhandleâ
mysql.c: In function âperform_mysql_searchâ:
mysql.c:108: error: âMYSQLâ undeclared (first use in this function)
mysql.c:108: error: (Each undeclared identifier is reported only once
mysql.c:108: error: for each function it appears in.)
mysql.c:108: error: âmysql_handleâ undeclared (first use in this function)
mysql.c:109: error: âMYSQL_RESâ undeclared (first use in this function)
mysql.c:109: error: âmysql_resultâ undeclared (first use in this function)
mysql.c:110: error: âMYSQL_ROWâ undeclared (first use in this function)
mysql.c:110: error: expected â;â before âmysql_row_dataâ
mysql.c:111: error: âMYSQL_FIELDâ undeclared (first use in this function)
mysql.c:111: error: âfieldsâ undeclared (first use in this function)
mysql.c:150: error: âmysql_connectionâ has no member named âhandleâ
mysql.c:205: warning: comparison between pointer and integer
mysql.c:217: error: âmysql_connectionâ has no member named âhandleâ
mysql.c:273: error: âmysql_row_dataâ undeclared (first use in this function)
mysql.c:275: warning: initialization makes pointer from integer without a cast
make[2]: *** [mysql.o] Error 1

Help! How can I solve this?

Regards

Maarten
 
I won't go into too much detail, but I'm guessing that the exim build can't find the mysql libs.
These are the compile options we use to compile mysql into DA:

-I/usr/include/mysql -L/usr/lib/mysql

So you probably need to hunt through the exim Makefile to find the spot to put them, or some variation of them.

John
 
Finally got a binary

Thanks,

That was a good start. Did some more digging, trying, digging, trying and finally got it compiled. :)
I added the following lines to the Local/Makefile

LOOKUP_INCLUDE=-I/usr/include/mysql -lmysqlclient
LOOKUP_LIBS=-L/usr/lib/mysql
HAVE_ICONV=yes
CFLAGS=-O -I/usr/local/include
EXTRALIBS_EXIM=-L/usr/local/lib -liconv

Regards
 
Back
Top