From roland at astrofoto.org Thu Sep 2 14:25:16 2004 From: roland at astrofoto.org (Roland Roberts) Date: Thu Sep 2 10:25:29 2004 Subject: [SA-exim] How to tell SA not to autolearn certain lists In-Reply-To: <20040826203729.GC13129@freshdot.net> (Sander Smeenk's message of "Thu, 26 Aug 2004 22:37:29 +0200") References: <20040826203729.GC13129@freshdot.net> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- I'm looking at this again and trying to understand the interaction between exim with sa-exim and with exiscan. My version of exim has both patches installed. So...when does local_scan run? There are three acl sets: acl_check_rcpt, acl_check_mime, and acl_check_content. The last two are disabled by default. I'm wading through the docs on them now. If I can look at the headers *before* local_scan kicks in, then I can set the header X-SA-Do-Not-Run: Yes and skip the run. So...when does the local_scan run? roland - -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises roland@rlenter.com 6818 Madeline Court roland@astrofoto.org Brooklyn, NY 11220 -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: noconv Comment: Processed by Mailcrypt 3.5.4, an Emacs/PGP interface iQCVAwUBQTdXfOoW38lmvDvNAQEo/wP6AinroS6A4juwJWSV1id1fATDy/IxslnF xGEJNGfFUbH08qzGW/BGsyir2HE0n7eAk21GXNfbUCSA4wiVQiBiMMbF4vil7NiT erKF1UWY2CIzqicHFsY29Q6KyHjEki6sUQRoftA44bxyCiGVhnFm2o/pmcadeD/K 1KUr6kMICZA= =VlZL -----END PGP SIGNATURE----- From juha at futhermucker.net Sat Sep 4 12:03:23 2004 From: juha at futhermucker.net (Juha Saarinen) Date: Fri Sep 3 16:04:17 2004 Subject: [SA-exim] Using SA-Exim with FreeBSD Exim port Message-ID: <4138F83B.6020304@futhermucker.net> Having migrated to FreeBSD 5.x from RHL recently, I am trying to set up SpamAssassin to check messages at SMTP time as before. However, while the FreeBSD Exim port comes with exiscan, it doesn't have the sa-exim patch by the looks of it. Found a post by Odhiambo Washington here: http://lists.merlins.org/archives/sa-exim/2003-May/000375.html outlining how to set up older versions. Does this method still work? Any pointers, hints, tips, URL, etc appreciated. :-) -- Juha From wash at wananchi.com Sat Sep 4 13:43:56 2004 From: wash at wananchi.com (Odhiambo Washington) Date: Sat Sep 4 02:44:38 2004 Subject: [SA-exim] Using SA-Exim with FreeBSD Exim port In-Reply-To: <4138F83B.6020304@futhermucker.net> References: <4138F83B.6020304@futhermucker.net> Message-ID: <20040904094356.GA88997@ns2.wananchi.com> * Juha Saarinen [20040904 02:05]: wrote: > Having migrated to FreeBSD 5.x from RHL recently, I am trying to set up > SpamAssassin to check messages at SMTP time as before. > > However, while the FreeBSD Exim port comes with exiscan, it doesn't have > the sa-exim patch by the looks of it. > > Found a post by Odhiambo Washington here: > > http://lists.merlins.org/archives/sa-exim/2003-May/000375.html > > outlining how to set up older versions. > > Does this method still work? > > Any pointers, hints, tips, URL, etc appreciated. :-) Hi Juha, Welcome to FreeBSD!! I wonder why you decided to cross the floor but that is OT. 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! 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.... So, even though I have not read the URL you referenced above, the instructions above should get you moving. 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 .... And one more thing ... I don't use sa-exim in production because policies do not allow me. I play with it in my personal box, but soon I am going to start running it for some clients on their boxes so that I don't get lost on the way. Again, you are most welcome to FreeBSD ;) -Wash http://www.netmeister.org/news/learn2quote.html -- +======================================================================+ |\ _,,,---,,_ | Odhiambo Washington Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922 '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121 +======================================================================+ DeVries's Dilemma: If you hit two keys on the typewriter, the one you don't want hits the paper. From juha at futhermucker.net Sun Sep 5 11:05:41 2004 From: juha at futhermucker.net (Juha Saarinen) Date: Sat Sep 4 15:07:54 2004 Subject: [SA-exim] Using SA-Exim with FreeBSD Exim port In-Reply-To: <20040904094356.GA88997@ns2.wananchi.com> References: <4138F83B.6020304@futhermucker.net> <20040904094356.GA88997@ns2.wananchi.com> Message-ID: <413A3C35.2020408@futhermucker.net> 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 From juha at futhermucker.net Sun Sep 5 11:42:31 2004 From: juha at futhermucker.net (Juha Saarinen) Date: Sat Sep 4 15:42:51 2004 Subject: [SA-exim] Using SA-Exim with FreeBSD Exim port In-Reply-To: <413A3C35.2020408@futhermucker.net> References: <4138F83B.6020304@futhermucker.net> <20040904094356.GA88997@ns2.wananchi.com> <413A3C35.2020408@futhermucker.net> Message-ID: <413A44D7.8040901@futhermucker.net> Juha Saarinen wrote: > ... 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? Did a bit of research, and -ldl seems to be a Linuxism that can be omitted on FreeBSD: http://www.cygwin.com/ml/cygwin/2003-07/msg00505.html http://lists.freebsd.org/pipermail/freebsd-questions/2003-September/019908.html http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2003-09/2303.html DLOPEN(3) FreeBSD Library Functions Manual DLOPEN(3) NAME dlopen, dlsym, dlfunc, dlerror, dlclose -- programmatic interface to the dynamic linker LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include void * dlopen(const char *path, int mode); void * dlsym(void * restrict handle, const char * restrict symbol); dlfunc_t dlfunc(void * restrict handle, const char * restrict symbol); const char * dlerror(void); int dlclose(void *handle); Next question: how to automagically strip the -ldl from LFLAGS (should really be LDFLAGS I think) when building on FreeBSD? -- Juha