Koozali.org: home of the SME Server

SpamAssassin upgrade?

Bill

SpamAssassin upgrade?
« on: September 23, 2003, 07:07:43 PM »
I see that spamassassin has just released a new version. What do I need to do to upgrade my SME 5.6 to the new version? Can I just load the standard rpm or is there more to it than that?

TIA  Bill

Dirk Jullens

Re: SpamAssassin upgrade?
« Reply #1 on: September 25, 2003, 01:00:05 PM »
I just downloaded the rpms from spamassassin.org.
did a rpm -Uvh --nodeps *.rpm on the folder i saved them in.
And then restarted /etc/init.d/spamassassin restart.

good luck

Dirk Jullens

Michiel

Re: SpamAssassin upgrade?
« Reply #2 on: September 25, 2003, 05:45:32 PM »
I wrote a little script that will automatically update SpamAssassin for you. It checks every day on www.spamassassin.org for newer rpms and downloads & installs them. Anyone care to test and/or comment on it?

You can find the script at http://mirror.contribs.org/smeserver/contribs/mblotwijk/Contribs/USA/ and all usual disclaimers apply :-)

Michiel

George

Re: SpamAssassin upgrade?
« Reply #3 on: September 27, 2003, 12:01:08 AM »
Michiel wrote:
>
> I wrote a little script that will automatically update
> SpamAssassin for you. It checks every day on
> www.spamassassin.org for newer rpms and downloads & installs
> them. Anyone care to test and/or comment on it?

I received the following error message three times -

./USA: [: too many arguments

when I ran it from the command line but it updated just fine.

Jens Kruuse

Re: SpamAssassin upgrade?
« Reply #4 on: September 27, 2003, 04:51:35 PM »
Yup, seems to work but with that same error as George saw.

/Jens

Michiel

Re: SpamAssassin upgrade?
« Reply #5 on: September 28, 2003, 12:45:58 AM »
> ./USA: [: too many arguments
George & Jens,

Thanks for the feed-back. What you saw was a cosmetic flaw that only occurs the first time you run it. I fixed it in the new release.

Michiel

George Siegel

Re: SpamAssassin upgrade?
« Reply #6 on: September 28, 2003, 12:56:19 AM »
> Thanks for the feed-back. What you saw was a cosmetic flaw
> that only occurs the first time you run it. I fixed it in the
> new release.

I thought it would be minor, it updated just great.

Jens Kruuse

Re: SpamAssassin upgrade?
« Reply #7 on: September 28, 2003, 01:53:26 AM »
I found another bug unfortunately. It is not in the udgrade script, but it affects users of Razor2 under SA 2.60. :-(

Razor2 is no longer working and requires a minor patch of the source code. See (Google cache):
http://216.239.59.104/search?q=cache:OTSxFiVetNIJ:spamassassin.taint.org/faq/index.cgi%3Freq%3Drecent+Insecure+dependency+razor2+&hl=en&ie=UTF-8

So I searched a bit and found this suggestion:
http://www.geocrawler.com/archives/3/2539/2002/9/50/9518810/

I gave it a try.
# mkdir /etc/e-smith/templates-user-custom/.procmailrc
# touch 11Razorfix
# cd /etc/e-smith/templates-user-custom/.procmailrc
# echo "DROPPRIVS=yes" >> 11Razorfix

Finally I restarted SpamAssassin and checked my .procmailrc. No luck fixing the problem. :-(

Okay another try (after removing my custom template):
#chmod +s /usr/bin/procmail

But that didn't work either.

Final test - both +s and the template:
Nope, doesn't work.

Reading between the lines, I suspect the next release of SA may fix the problem. At least I hope so. On the plus side, my spam checks have dropped from 25-35 seconds to 2-3. :-)

Cheers,
Jens

More references:
http://search.cpan.org/src/JMASON/Mail-SpamAssassin-2.60/Changes
And from the GMANE Mailinglist:
>- Razor2 isn't fully taint safe.  So since SpamAssassin 2.60 enables
>  taint mode by default, there's a Razor2.patch file which needs to be
>  applied to Razor2.  Documentation exists in the patch file.

Jens Kruuse

Re: SpamAssassin upgrade?
« Reply #8 on: September 28, 2003, 01:55:07 AM »
Erm, the lines in the mini-script got switched around by mistake. That is not the cause. I did it the right way at the console. ;-)

Jens Kruuse

Re: SpamAssassin upgrade?
« Reply #9 on: September 28, 2003, 02:33:49 AM »
And another update with a working solution. The other non-working solutions have been removed.

0) Do a backup of all files and dirs in /usr/lib/perl5/site_perl/5.6.1/i386-linux/Razor2 - just in case.

1) Open a console and enter the following commands
# cd /usr/lib/perl5/site_perl/5.6.1/i386-linux/Razor2
# wget http://www.spamassassin.org/released/Razor2.patch
# patch -p0 Razor2.patch
(That's a zero after the "-p")

2) Restart SpamAssassin in the Server-Manager.

Cheers,
Jens

Michiel

Re: SpamAssassin upgrade?
« Reply #10 on: September 28, 2003, 02:49:11 AM »
Thanks for the research Jens! One little remark though. I guess you ment
# patch -p0 < Razor2.patch

Michiel

Jens Kruuse

Re: SpamAssassin upgrade?
« Reply #11 on: September 28, 2003, 02:52:01 AM »
Yes, I did. (Must be the keyboard). ;-)

tpearsall

Re: SpamAssassin upgrade?
« Reply #12 on: September 29, 2003, 07:43:52 PM »
I just downloaded your script (great idea!!) and ran it without errors and it listed NEW='yes', but didn't seem to download anything.  I'm have VERY little shell sciptign experience but took a look at it anyway.  It didn't look the the NEW variable was being set, only displayed so I made 1 change and it is working for me.

# Check if we need to update any of the rpms
NEW='no'
RPMS=sed s/\.i386\.rpm//gi $DLDIR/dl.lst
for RPM in $RPMS; do
    if [ "rpm -q $RPM" != $RPM ]; then
            echo $RPM "NEW='yes'"
            NEW='yes'   <<<< new line
    fi
done

Not sure if I'm missing something, but wanted to post my change for any comments.

Thanks,
Todd

Michiel

Re: SpamAssassin upgrade?
« Reply #13 on: September 29, 2003, 09:01:07 PM »
Hmm, that was a bit sloppy of me :-/  I put that line in for debugging purposes and forgot to remove it. It has now been fixed in 0.1.3beta.

Thanks for the feed back.

Michiel