Blame | Last modification | View Log | RSS feed
READ THIS FIRST---------------If you try to build with 'make' without editing the makefile for sa-exim tosee the exim source, and if you haven't patched your exim source withlocalscan_dlopen.patch, sa-exim will not build.This is normal, see the BUILDING section belowThis version of sa-exim now requires at least exim 4.11BUILDING--------The code can be compiled in two ways:0) Do not set LOCAL_SCAN_HAS_OPTIONS=yes in exim's Makefile. Leave thedefault which is disabled.1) Unpack exim 4.11 or better, and overwrite src/local_scan.c withsa-exim.c.In the sa-exim distribution directory, type make sa-exim.h, and copyit in the same place than sa-exim.c.Rebuild exim, and you're done.Note that if you do this, you are responsible for modifying variablesin sa-exim.c that would normally have been modified by the Makefile.This method might seem simpler, but it requires that you rebuild exim everytime you upgrade sa-exim.2) The better solution is to patch exim with localscan_dlopen.patch originallyfrom David Woodhouse (provided in this archive), and rebuild exim.Here are details on how to patch exim if yours needs it (at least debian'sexim4 is prepatched, yours may be too).Choose the patch for your exim version (Philip included the portion thatsets LOCAL_SCAN_ABI_VERSION_MAJOR and LOCAL_SCAN_ABI_VERSION_MINOR in exim4.20)- localscan_dlopen_exim_4.20_or_better.patch- localscan_dlopen_up_to_4.14.patchWhat you gain from doing this is that sa-exim, or another local_scan modulecan be plugged into exim without rebuilding exim itself (here too you needexim 4.11 or better)To build, you can edit EXIM_SRC in the Makefile and build sa-exim-x.y.so,or I have also recently modified the build environment so that you cannow build sa-exim without having the exim sources.You can look in eximinc/version to see which source I included. While thisshould work for the forseable future, the exim local_scan API might changeone day and not building against the current exim sources could cause issues(hopefully, at worst it will prevent sa-exim from using better functions innewer versions of the local_scan API).To be really safe, I modified the localscan_dlopen patch to include aminor and major version number for the API. Philip has agreed to includingthe piece of the patch that says which version of the API exim is using,so it will be obvious in the future whether exim becomes potentiallyincompatible with an older version of sa-exim. Note that when Philip addsthis small portion of the patch, you will have a resulting conflict ifyou try to apply it again. This is obviously normal, just remove it :-)Once you're done building, you can copy sa-exim-x.y.so and optionally thedummy/test accept.so in /usr/lib/exim4/local_scan/, and add this to yourexim4.conf (at the beginning of the file)#local_scan_path = /usr/lib/exim4/local_scan/accept.solocal_scan_path = /usr/lib/exim4/local_scan/sa-exim.soIf you are a package builder, note that you don't actually haveto edit the values in the Makefile, you can override them as such:make SACONF=/etc/mail/sa-exim.conf LDFLAGS="-shared -fPIC"The following is mostly obsolete, but left here for info purposes-----------------------------------------------------------------I would also recommend to edit exim/src/config.h.defaults as such:#define STRING_SPRINTF_BUFFER_SIZE 32768The default value is a bit too small for some of the strings that we need toexpand from SA.That said, I found out that exim then complaints that the headersit tries to add are too big even after I set "uschar buffer[32768];" insrc/header.c.As a result, I haven't quite found out how to deal with more than 8KB worthof SpamAssassin headers, but it may not be a huge deal, 8KB headers are toolong anyway.I asked the SA guys not to output such huge headers and I wrote a patchto disable one of the "features" that outputs such huge headers.See: http://bugzilla.spamassassin.org/showattachment.cgi?attach_id=195This is included and turned on by default in Spamassassin 2.40 and later.INSTALL-------Copy sa-exim.conf to /etc/exim4 (or whatever you set SACONF to),and make sure to read it and edit the values to suit your environment.So that you don't make any mistakes, SAEximRunCond is turned off by default.This should force you to scan the docs before potentially shooting yourselfin the foot :)See README for options