>>> Leander Koornneef <[EMAIL PROTECTED]> 11/06/06 02:26PM >>>

On 6-nov-2006, at 19:59, Claus Westerkamp wrote:

> Hello list,
>
> Id like to modify the Score output of spamassassin. I want 3digits  
> display permanently (e.g. ***(Score002.3)*** or ***(Score102.3)*** )
>
> Is this possible? I want it to be able to sort the spam-messages by  
> Score.

Of course this is possible, but you will probably have to
hack some code to get the result you want. As far as I
know, there is no configuration option for this.

If you are using amavis for instance, you could change
the part where $full_spam_status is put together from:

        sprintf("%3.1f",$spam_level)

to something like:

        sprintf("%05.1f",$spam_level)

In spamd this would be from:

        my $msg_score     = sprintf( "%.1f", $status->get_score );

to:
        my $msg_score     = sprintf( "%05.1f", $status->get_score );

Also beware that this will be overwritten when you update/upgrade
your software...

Leander
========================>
Try this from the docs under "Template Tags":

 _SCORE(PAD)_      message score, if PAD is included and is either spaces or
                   zeroes, then pad scores with that many spaces or zeroes
                   (default, none)  ie: _SCORE(0)_ makes 2.4 become 02.4,
                   _SCORE(00)_ is 002.4.  12.3 would be 12.3 and 012.3
                   respectively.

Rob

Reply via email to