Mailing List Archive

$spam_score_int
Hi,

what could be the reason that $spam_score is set but $spam_score_int isn't?

acl_check_data:

warn message = X-Spam-Score: $spam_score ($spam_bar)
spam = nobody:true
warn message = X-Spam-Report: $spam_report
spam = nobody:true

deny message = Classified as spam (score
$spam_score)\nX-Spam-Report:$spam_report
condition = ${if >{$spam_score_int}{400}{1}{0}}
spam = nobody:true/defer_ok


Debug:
******
[...]
1873 check spam = nobody:true
1873 warn: condition test succeeded
1873 processing "deny"
1873 check condition = ${if >{$spam_score_int}{400}{1}{0}}
1873 = 0
1873 deny: condition test failed
1873 processing "accept"
1873 accept: condition test succeeded
1873 >>Headers added by DATA ACL:
1873 X-Spam-Score: 10.3 (++++++++++)
[...]


christian

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: $spam_score_int [ In reply to ]
On 2008-11-24 at 16:49 +0100, Christian Meutes wrote:
> what could be the reason that $spam_score is set but $spam_score_int isn't?

That's not happening.

> acl_check_data:
>
> warn message = X-Spam-Score: $spam_score ($spam_bar)
> spam = nobody:true
> warn message = X-Spam-Report: $spam_report
> spam = nobody:true
>
> deny message = Classified as spam (score
> $spam_score)\nX-Spam-Report:$spam_report
> condition = ${if >{$spam_score_int}{400}{1}{0}}
> spam = nobody:true/defer_ok

Your condition is true for scores greater than 40.0 (and 40.0 itself is
not large enough, I suspect >= would be closer).

> 1873 processing "deny"
> 1873 check condition = ${if >{$spam_score_int}{400}{1}{0}}
> 1873 = 0
> 1873 deny: condition test failed
> 1873 processing "accept"
> 1873 accept: condition test succeeded
> 1873 >>Headers added by DATA ACL:
> 1873 X-Spam-Score: 10.3 (++++++++++)

So $spam_score is 10.3, thus $spam_score_int will be 103. 103 is not
greater than 400, so the ${if <condition> } took the 'else' branch,
resulting in 0.

If you use -d+expand you'll see the expansion broken down into more
detail.

-Phil

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: $spam_score_int [ In reply to ]
Hi,

--On Dienstag, 25. November 2008 01:28 -0800 Phil Pennock
<exim-users@spodhuis.org> wrote:
> Your condition is true for scores greater than 40.0 (and 40.0 itself is
> not large enough, I suspect >= would be closer).

i configured that integer for a long while now and thought it would be
working.
Had im mind that it has to be 3-digit.

Thanks.

Cheers,
christian

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: $spam_score_int [ In reply to ]
On 10/03/2023 10:26, John McMurray via Exim-users wrote:
> I'd also like to be able to increase the $spam_score_int variable so that mail clients can decide how they want to handle higher spam scores.

That variable is set by a call to SpamAssasin. Your code snippet doesn't
mention it; it's unclear how you are thinking of using it.

It is described in the documentation.

You can't modify it. You might not need to, to do what you want.
--
Cheers,
Jeremy


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/