Re: Using SA-Exim with FreeBSD Exim port

Juha Saarinen <[email protected]>
Newsgroups gmane.mail.exim.spamassassin
Message-ID <[email protected]>
Hey Wash,

Odhiambo Washington wrote:

> Welcome to FreeBSD!! I wonder why you decided to cross the floor but
> that is OT.

Well, it's a quiet list so... I never left the floor so to speak, as I 
play with just about every OS imaginable in my line of work. 
Nevertheless, FreeBSD end up in the "nice, but life's too short" 
compartment, as I found myself doing much too much admin'ing with it.

Take the the multiple /etc directories on FreeBSD: I'm sure there's a 
reason for it (network mounted volumes e.g.) but enabling system daemons 
in /usr/local/etc/rc.d through /etc/rc.conf... aaaaaaaccckkk....

Now OpenBSD... that's another thing entirely, and with hindsight, I 
should've used that for the new box :-)

> Get sa-exim-4.1.tar.gz and read the INSTALL file included. Use method
> no 2 to build. I have just run a test on compilation:
> 
> tar yxvf exim-4.42.tar.bz2
> bunzip2 exiscan-acl-4.42-27.patch.bz2
> tar xzvf sa-exim-4.1.tar.gz
> 
> Then I did
> 
> cd exim-4.42
> patch -p1 < ../exiscan-acl-4.42-27.patch
> patch -p1 < ../sa-exim-4.1/localscan_dlopen_exim_4.20_or_better.patch
> cp src EDITME Local/Makefile
> 
> # I then edited the Local/Makefile to reflect my desires ;)
> 
> make
> 
> ... and the make succeeded!

It did here too, after I tweaked this bit:

# If you set DLOPEN_LOCAL_SCAN, then you need to include -rdynamic in the
# linker flags.  Without it, the loaded .so won't be able to access any
# functions from exim.

LFLAGS=-rdynamic -ldl

gcc -c -O2 -pipe -funroll-loops -ffast-math -march=pentium4  -o 
exim_dbmbuild.o exim_dbmbuild.c
gcc -o exim_dbmbuild -rdynamic -ldl exim_dbmbuild.o  -lcrypt
/usr/bin/ld: cannot find -ldl
*** Error code 1

Stop in /home/juha/eximsawork/exim-4.42/build-FreeBSD-i386.
*** Error code 1

Stop in /home/juha/eximsawork/exim-4.42.

-bash-2.05b$ ld -v
GNU ld version 2.15 [FreeBSD] 2004-05-23

$ gcc -v
Using built-in specs.
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 3.4.2 [FreeBSD] 20040728

Tried compiling a few other code examples that use the "-ldl" flag, and 
they failed in each case. Looking through the Makefile for Exim 4.42 I 
see this:

# You probably need to add -lpam to EXTRALIBS, and in some releases of
# GNU/Linux -ldl is also needed.

... which makes me think "-ldl" is a Linuxism introduced by the 
localscan_dlopen patch. Could someone fill me in on what it does, and 
whether or not "-ldl" is necessary?


> cd ../sa-exim-4.1
> 
> Edited the Makefile and changed the following values:
> 
> SACONF=/etc/exim4/sa-exim.conf	# I did not touch that, it's okay for me
> SPAMC=/usr/local/bin/spamc	# Change this where your spamc is
> 				# Mine is in /usr/local/bin/
> EXIM_SRC= ../exim-4.42/src	# I changed this as well
> 
> gmake
> 
> ... and the make succeeded....

Yep, I can confirm this.

> The only thing I see you'll miss (even though not so many people
> use it) is the ability to compile SPF and SRS functionality into
> Exim, which is easier done via the ports ....

Not a believer in SPF, so won't miss that or SRS.

Actually, I'll bug the Exim port maintainer to get sa-exim incorporated 
there :-).

-- 
Juha
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.