SA 3.0 upgrade bug and fix (spamd reporting to log, but not tagging messages)

2004-09-23 Thread Brian L . Gentry
Following our upgrade to SA 3.0 today we experienced a very odd problem.  When 
checking messages with spamc, spamd would report the status to syslog (putting 
it into my mail log files) but it would *not* add X-Spam headers, nor would it 
modify the subject line as my rules file directed it to.  I've tracked down the 
root cause of the problem and fixed it.  Here's the explanation:

Spam Assassin 2.6X put the spamd script in /usr/sbin/spamd .  SA 3.0 has moved 
it to /usr/bin/spamd (no longer in sbin, now just in bin).  So, when I upgraded 
via CPAN, the *new* spamd got put in a new place.  I fired up the system spamd 
startup script and it started the *old* version of the spamd script.  It's was 
using the new Mail::SpamAssassin module under the covers, but it's still the 
old spamd script.  I verified this by checking the modification date 
on /usr/sbin/spamd :  It was very old.

For some reason, using this old version of the spamd script (from my 2.63 
installation), with the new spamc (/usr/bin/spamc) causes it to properly report 
the statistics to syslog, but it *will not* actually tag the email with X-Spam 
headers, rewrite the subject line, etc.  Another telltale sign that you aren't 
using the 3.0 spamd is that you won't get the new verbose lines in syslog, 
listing the spam score and the names of all of the tests that matched on each 
message.  Finally, though it seems very weird, spamd reports that it is version 
3.0 in syslog, even though it is really the older script.  It probably has to 
do with using the new perl modules; the version is probably retrieved from the 
module and not from the script itself.

The fix is obvious and simple:  Shut down spamd, start it from the command 
line:  /usr/bin/spamd -c -d .  Test it.  Once you've verified that it's working 
again, modify your spamd startup script to use the new location for spamd.  I 
also removed /usr/sbin/spamd for good measure, since it's not used any more.

This took a while to track down and caused us some grief here.  I hope this 
helps save someone else the hassle.  Any chance this could be put into the 
upgrade notes file ?

Brian L. Gentry



Re: SA 3.0 upgrade bug and fix (spamd reporting to log, but not tagging messages)

2004-09-24 Thread Anthony Edwards
On Thu, Sep 23, 2004 at 09:12:18PM +, Brian L. Gentry wrote:

> The fix is obvious and simple:  Shut down spamd, start it from the command 
> line:  /usr/bin/spamd -c -d .  Test it.  Once you've verified that it's 
> working 
> again, modify your spamd startup script to use the new location for spamd.  I 
> also removed /usr/sbin/spamd for good measure, since it's not used any more.
> 
> This took a while to track down and caused us some grief here.  I hope this 
> helps save someone else the hassle.  Any chance this could be put into the 
> upgrade notes file ?

This is an excellent idea, and thanks for your note earlier today.
That is indeed it seems the cause of the issue, which must be causing
a good deal of scratching of heads, I would have thought.

I removed all SpamAssassin files earlier this evening and re-installed
using cpan.  With hindsight, I believe I could have simply done what
you have suggested above.  I run a SuSE 8.2 system, and persuading
manual configuration of startup script changes to co-exist with SuSE's
YaST tool created configurations is far from trivial, so I shall be
sticking with /usr/bin/spamassassin for the time being.

Incidentally, a co-worker who runs a Debian system tells me that the
Debian package maintainer has overcome the issue by creating the Debian
SpamAssassin 3.0.0 package in such a way that spamd is installed in
/usr/sbin/ rather than /usr/bin, as with previous versions.

-- 
Anthony Edwards
[EMAIL PROTECTED]


Re: SA 3.0 upgrade bug and fix (spamd reporting to log, but not tagging messages)

2004-09-24 Thread Anthony Edwards
On Fri, Sep 24, 2004 at 03:04:58AM +0100, Anthony Edwards wrote:
 
> I removed all SpamAssassin files earlier this evening and re-installed
> using cpan.  With hindsight, I believe I could have simply done what
> you have suggested above.  I run a SuSE 8.2 system, and persuading
> manual configuration of startup script changes to co-exist with SuSE's
> YaST tool created configurations is far from trivial, so I shall be
> sticking with /usr/bin/spamassassin for the time being.

In fact, it's easy, or would be if the script at:

http://kmail.kde.org/unsupported/spamd

Actually worked properly on SuSE 8.2.  Unfortunately, it doesn't seem
to, quite.  If it did, it would be a simple matter of downloading and
copying it to the /etc/init.d directory, changing file permissions,
then running YaST and configuring spamd to start in runlevels 3 &
5  using the Runlevel Editor.

-- 
Anthony Edwards
[EMAIL PROTECTED]


Re: SA 3.0 upgrade bug and fix (spamd reporting to log, but not tagging messages)

2004-09-26 Thread Anthony Edwards
On Fri, Sep 24, 2004 at 06:12:53PM +0100, Anthony Edwards wrote:
> On Fri, Sep 24, 2004 at 03:04:58AM +0100, Anthony Edwards wrote:
>  
> > I removed all SpamAssassin files earlier this evening and re-installed
> > using cpan.  With hindsight, I believe I could have simply done what
> > you have suggested above.  I run a SuSE 8.2 system, and persuading
> > manual configuration of startup script changes to co-exist with SuSE's
> > YaST tool created configurations is far from trivial, so I shall be
> > sticking with /usr/bin/spamassassin for the time being.
> 
> In fact, it's easy, or would be if the script at:
> 
> http://kmail.kde.org/unsupported/spamd
> 
> Actually worked properly on SuSE 8.2.  Unfortunately, it doesn't seem
> to, quite.  If it did, it would be a simple matter of downloading and
> copying it to the /etc/init.d directory, changing file permissions,
> then running YaST and configuring spamd to start in runlevels 3 &
> 5  using the Runlevel Editor.
 
The answer to this, of course (on a SuSE 8.2 system at least) was to
download:

ftp://ftp.suse.com/pub/suse/i386/8.2/suse/src/spamassassin-2.50-14.src.rpm

Then, do:

[EMAIL PROTECTED]:~/software> rpm2cpio spamassassin-2.50-14.src.rpm | cpio
-iv init.spamd

Next, edit init.spamd to change the line:

SPAMD_BIN=/usr/sbin/spamd

To read:

SPAMD_BIN=/usr/bin/spamd

Then, copy the resultant changed file [1] to /etc/init.d/spamd, and
next use the YaST Runlevel Editor to start spamd in runlevels 3 & 5.

Working perfectly now.

[1] http://www.805.org.uk/spamd.txt

-- 
Anthony Edwards
[EMAIL PROTECTED]