On Tue, 2014-05-27 at 02:48 +0200, Karsten Bräckelmann wrote: > On Sat, 2014-05-24 at 12:34 +0100, Martin Gregorie wrote: > > On Sat, 2014-05-24 at 05:04 +0200, Karsten Bräckelmann wrote: > > > LATER: This morning I reran some failing examples after rebooting the > > test machine. No change, so I tried a few stripped-down runs, i.e. I > > started spamd via a test script that uses systemctl to start or stop it > > and then used "spamc <testmessage" to exercise it while I played round > > with spamc options. In the course of this I noticed a strange effect: > > > > The FIRST message after restarting spamd never has X-Spam headers, but > > the second and subsequent ones do have X-Spam headers. > > > > I'm running these versions: > > > > $ spamd --version > > SpamAssassin Server version 3.3.2 > > running on Perl 5.18.2 > > with SSL support (IO::Socket::SSL 1.955) > > with zlib support (Compress::Zlib 2.062) > > $ spamc --version > > SpamAssassin Client version 3.2.4 > > > > Should the spamc/spamd version mismatch have any bad effects? > > No, there should be absolutely no problems, since spamc/d are using a > protocol that hasn't even added features since 3.2, let alone changed in > an incompatible way. > > It does indicate a real problem with your package management or custom > builds, though. > > > > The only SA package I have installed is spamassassin.i686 3.3.2-56.fc20 > > which came from atrpms. This is odd, since all the uninstalled packages > > (spamass-milter, spamass-milter-postfix, spamassassin-FuzzyOcr, > > spamassassin-iXhash2, spambayes, spampd, spamprobe.i686) are from Fedore > > repositories as you'd expect. Removing and reinstalling the spamassassin > > package has had no effect. > > > > I'll take this up with RedHat next week and see if I can find out why > > they no longer provide the main spamassassin package in their > > repository. > > A quick googlin' brings up spamassassin 3.3.2-18.fc20 for Fedora 20, in > a single package shipping both spamc and spamd in /usr/bin. > After deleting and reinstalling (yum install spamassassin) I now have spamassassin.i686 3.3.2-18.fc20 installed but with no apparent effect: it is running these versions:
# spamd --version SpamAssassin Server version 3.3.2 running on Perl 5.18.2 with SSL support (IO::Socket::SSL 1.955) with zlib support (Compress::Zlib 2.062) # spamc --version SpamAssassin Client version 3.2.4 exactly as before. Yum says it knows about these spamassassin package: Installed Packages spamassassin.i686 3.3.2-18.fc20 @updates Available Packages spamassassin.i686 3.3.2-56.fc20 atrpms which at least explains why the atrpms package was installed rather than the Fedora @updates one. The only problem is as before $ start sa # private script which uses systemctl start spamassassin # which is running under root as expected $ ps -ef |grep spamd root 23426 1 6 17:28 ? 00:00:03 /usr/bin/spamd --pidfile /var/run/spamd.pid -d -c -m5 -H root 23427 23426 0 17:28 ? 00:00:00 spamd child root 23428 23426 0 17:28 ? 00:00:00 spamd child kiwi 23449 23142 0 17:29 pts/1 00:00:00 grep --color=auto spamd $ testsa data/sale57.txt Checking data/sale57.txt -------- ======== Checked 1 messages in 0 secs, 0 mS/message $ testsa data/sale57.txt Checking data/sale57.txt -------- X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on zappa.gregorie.lan X-Spam-Flag: YES X-Spam-Level: ******* X-Spam-Status: Yes, score=7.9 required=6.0 tests=HTML_IMAGE_RATIO_04, HTML_MESSAGE,MG_MONEY,MG_PRICE,MG_PRODUCT,MG_SALE,MG_SALESOFFER,MG_SALESPAM, MG_SPAMREF,RP_MATCHES_RCVD,T_DKIM_INVALID,T_END_FUTURE_EMAILS, UNPARSEABLE_RELAY autolearn=no version=3.3.2 ======== Checked 1 messages in 0 secs, 0 mS/message $ sa stop As you can see, spamc/spamd from @updates does exactly the same as the one from atrpms: the first message passed by spamc after spamd is started apparently does nothing but the second and subsequent ones are scanned. The testsa script looks like this: $ cat testsa #!/bin/bash # #help # Syntax: testsa [-x] testmessage..... # Function: Run one or more messages through spamc # The output is filtered to contain only headers # added by Spamassassin # Options: -x show the whole message #end if [ "$1" == '-?' ] then script_help testsa exit 1 fi state=$(spamdstatus) if [ "$state" == 'spamd is stopped' ] then sudo systemctl start spamassassin.service fi if [ "$1" == '-x' ] then filter=no shift else filter=yes fi tcount=0 starttime=$(date +%s) for s do echo "Checking $s" echo "--------" if [ $filter == 'yes' ] then spamc --max-size=1000000 <$s | gawk ' BEGIN { tag=0 } /^X-Spam/ { tag=1; print; next } /^ / || /^\t/ { if (tag==1) { print } next } { tag = 0 } ' else spamc <$s fi echo "========" tcount=$(expr $tcount + 1) done endtime=$(date +%s) elapsed=$(expr $endtime - $starttime) rate=$(expr $elapsed \* 1000 / $tcount) echo "Checked $tcount messages in $elapsed secs, $rate mS/message" if [ "$state" == 'spamd is stopped' ] then sudo systemctl stop spamassassin.service fi Obviously something is wrong, but should this be raised on the Fedora Bugzilla or would it be better raised within the SA project? Martin