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

Reply via email to