how to build Spamassassin

Lucas Holt luke at foolishgames.com
Tue Dec 9 18:20:42 PST 2003


The ports collection is great for certain things.  I do happen to use 
it for spam assassin on 4.9 Stable.  I have perl 5.8.2 installed from 
ports and I used use.perl to set it up as default.

Here is the problem with ports, many maintainers are using 5.x now.  
Since there is only one ports collection, things are OFTEN broken or 
don't work quite right.  Sometimes features just aren't there.. look at 
the Sendmail -SASL port.. you can't use milter's without installing GCC 
3 or upgrading to 5.  Sometimes the ports are just plain out of date.

There is nothing wrong with avoiding the ports collection when you need 
control or recent software.  All of my web server related stuff is 
installed manually because I have a complex setup and i really don't 
feel like the extra hurdles the ports collection requires for apache 2 
+ mod jk + php 4.3 + perl + tomcat 4.1.x ... etc

On the flip side, i love it for x11.

If you change your mind on spam assassin, here is a procedure that 
should work.
Install Perl 5.8.2 from ports (or source)
Install Spam assassin from ports (or source)
Install razor (it helps a lot)

I personally use anomy mail (a script) with procmail to run spam 
assassin and clam av on incoming mail.  I switched over to smapd and 
spamc for a slight performance improvement.  It works fine on my mail 
server (low traffic).

The real thing to remember about ports is to try to use it all or 
nothing for a given type of services.  Trying to mix and match doesn't 
work well.  Its a lot of work actually.



On Dec 9, 2003, at 8:11 PM, Tony Jones wrote:

>
> Hi Nick.
>
> Thanks for the reply.
>
> I already knew of the FreeBSD stock perl issues and was aware that
> under no circumstances should I try to upgrade the stock Perl, but
> I appreciate the reminded nontheless!!
>
> I gave up on trying to install the SpamAssassin I obtained manually
> from spamassassin.org after it bitched that my Bundle::Net (or 
> similar, sorry,
> forget the exact package) was out of date. Trying to install it via 
> CPAM
> crapped out bigtime and seems to have left my stock FreeBSD perl setup 
> in a
> goofy state.  Perl would spit out nasty method tracebacks.
>
> Can someone tell me if it is possible to redo just the perl portion of 
> a
> "make installworld" so I can reset my stock module config ?
>
> Giving up on this approach, with the help of Jan Grant's earlier reply
> I got the ports tree to work. [I needed to unpack the whole ports.tgz, 
> not
> just the spamassassin subdir]
>
> First problem was that the MD5 on the downloaded distfile (that the 
> ports
> Makefile downloaded from spamassassin.org) didn't match:
>
> < MD5 (Mail-SpamAssassin-2.60.tar.gz) = 
> 65ece9dec35cc4701d98680d0651afd3
> ---
>> MD5 (Mail-SpamAssassin-2.60.tar.gz) = 46d1db67ed1d860ddb136e0beb5f6ac3
>
> I temporarily updated the MD5 so I could get past this, e-mailed the
> maintainer.  I wasn't planning on installing until I heard back, but 
> since
> the stock make did a bunch of perl module updating foo,  if the tar.gz 
> is
> trojaned I could already be screwed :-(
>
> Next the make groks when it tries to configure spamd,  claims gcc 
> isn't in
> the PATH,  though it's in roots path once make drops back to the shell.
>
> This is probably easily fixable, but at this point I gave up and 
> started
> working on what I get paid to do :-) All of this is on FreeBSD 4.9.
>
> I'm reminded of Greg Lemis's chastisement of me for previously not 
> using
> the FreeBSD Ports system.  It isn't making my life much easier here 
> :-)))
>
> Tony
>
>> Hm, well, if you hate perl perhaps you should consider using a spam
>> filtering package written in some other language!
>>
>> The problem with FreeBSD and perl is well documented . . . basically 
>> the
>> FreebSD system has perl 5.005_03 which is a very old version 
>> nowadays, and
>> many modules require 5.6.1 at least if not 5.8+.
>>
>> The simplest and easiest way to clear up these problems is to install 
>> a
>> new perl from source, in a non-standard location, so it creates its 
>> own
>> libraries from scratch. I recommend creating a user perl and 
>> installing
>> everything under /home/perl. Then at the end just change the symlinks 
>> to
>> /usr/bin/perl etc.
>>
>> Do _not_ try to install a new perl over the 5.005 version that 
>> FreeBSD has
>> installed by default. FreeBSD creates non-standard library locations 
>> and
>> you will have lots of problems.
>>
>> If you follow this advice you won't have any problem using CPAN to 
>> install
>> libwww, Mail::SpamAssassin and all the other modules you need or 
>> currently
>> use.perl and CPAN are _very_ reliable.
>>
>> If you upgrade your FreeBSD to 5.1 you will find that the stock perl 
>> is
>> 5.6.1 and most stuff Just Works with it. The perl has also been 
>> separated
>>  from the base distribution and is now installed as a package (or 
>> port) so
>> it doesn't break when you update it.
>>
>> On FreeBSD prior to 5.x I always built a new perl from source as I
>> described, and then built all my applications from source too 
>> (including
>> apache, mod_perl, mysql and a bunch of perl applications like
>> SpanAssassin). I too have encountered the 'ports or bust' mentality 
>> and
>> while it is good in theory it just doesn't work in practise where 
>> perl is
>> concerned. And there's way too much stuff depends on perl (for me at
>> least) for it to be flaky.
>>
>> Hope this helps,
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe at freebsd.org"
>
>

Lucas Holt
Luke at FoolishGames.com
________________________________________________________
FoolishGames.com  (Jewel Fan Site)
JustJournal.com (Free blogging)

'Re-implementing what I designed in 1979 is not interesting to me 
personally. For kids who are 20 years younger than me, Linux is a great 
way to cut your teeth. It's a cultural phenomenon and a business 
phenomenon. Mac OS X is a rock-solid system that's beautifully 
designed. I much prefer it to Linux.'
-- Bill Joy, Wired Article 2003



More information about the freebsd-questions mailing list