Re: Qmail-scanner ST - Spamassassin Verbose bug

Salvatore Toribio <[email protected]>
Newsgroups gmane.mail.qmail.scanner
Message-ID <a06240802c2897d886d53@[10.0.1.2]>
At 14:20 +0200 30-05-2007, Arno Slatius wrote:
>Hi,
>
>I found a small problem in the ST patched version (20070204) of the
>Qmail-scanner (it might also occur in the original version,  havent looked
>it to it).
>
>I've had a few spam messages that already contained the X-Spam-Status line
>in the original header which the verbose Spamassassin looks for:
>   X-Spam-Status: No, hits=0.1 required=5.0
>
>The actual message scores quite a bit higher:
>   X-Spam-Status: Yes, score=36.5 required=3.5
>
>Problem is that the line with the 0.1 score is futher down the message and
>the spam score variable gets overwritten by this value. This of course can
>be cured by a simple comparison. Attached is a diff of my
>qmail-scanner-queue.pl where you can see the change.
>
>It wasn't a major problem but users were getting Spamassassin tagged spam
>messages which would normaly be deleted by the qmail-scanner.
>

Hi Arno

You are right, that check is wrong, and it is also wrong in the 
original version I hope Jason should read this email.

I think that there is a better way to fix it, I'm not sure that your 
proposed solution will always work. It should be better to add a 
'last' statement after the check is matched.

       #X-Spam-Status: No, score=2.8 required=5.0
       if (/^X-Spam-Status: (Yes|No), (hits|score)=(-?[\d\.]*) 
required=([\d\.]*)/) {
         $sa_tag++;
         $sa_status=1 if ($1 eq "Yes");
         $sa_score=$3;$required_hits=$4;
         last;                      #  <-- Add this line
       }

So the first 'X-Spam-Status' found (that must be from your server), 
stops the search.

But, again, better don't use verbose_spamassassin...

ST

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.