Decimal values for spam tests

Use this forum if you want to suggest a new feature to hMailServer. Before posting, please search the forum to confirm that it has not already been suggested.
Post Reply
mikernet
New user
New user
Posts: 22
Joined: 2018-09-04 22:22

Decimal values for spam tests

Post by mikernet » 2019-03-01 19:06

It would be great to be able to enter decimal values instead of just integers for the spam test scores as well as the spam thresholds, particularly when using it with SpamAssassin. I really want to mark my spam threshold as a x.5 value for the threshold as well as for some of the spam tests but I need to pick a value that's either too high or too low right now.

hMailServer clearly supports decimals in the back-end, seeing as SpamAssassin scores are decimals and it adds them correctly.

User avatar
mattg
Moderator
Moderator
Posts: 19646
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Decimal values for spam tests

Post by mattg » 2019-03-02 02:26

My SpamAssassin ALWAYS returns integers (rounded down)
(And subsequently all of my hMailserver scores are also integers)


There must be a setting in SpamAssassin that does that. Any ideas which one? I'd probably turn it off.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

mikernet
New user
New user
Posts: 22
Joined: 2018-09-04 22:22

Re: Decimal values for spam tests

Post by mikernet » 2019-03-02 02:28

Hmmm? SpamAssassin has always returned decimal spam score values.

EDIT: Oh wait...I see what you mean - the computed X-hMailServer-Reason-Score does look like it's always a whole number. Nevermind then. I've just always looked at the X-Spam-Status header scores SpamAssassin returns when tuning things, I didn't realize hMailServer only gets an integer number.

Well, dangit...

mikernet
New user
New user
Posts: 22
Joined: 2018-09-04 22:22

Re: Decimal values for spam tests

Post by mikernet » 2019-03-02 02:36

You wouldn't happen to know if there's a way to configure SA to multiply the final score by a certain amount without editing every single rule would you? If I could multiply the score before it's returned then I could get more granular control over the threshold values in hMailServer as I'll have a wider range of values to play with. My searches aren't turning up anything useful at the moment.

User avatar
mattg
Moderator
Moderator
Posts: 19646
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Decimal values for spam tests

Post by mattg » 2019-03-02 02:41

From my SpamD Log (on my Ubuntu spam appliance)

Code: Select all

Sat Mar  2 09:56:17 2019 [24240] info: spamd: connection from 10.10.10.150 [10.10.10.150]:64885 to port 783, fd 5
Sat Mar  2 09:56:17 2019 [24240] info: spamd: processing message <1551385408751-sg-apac-prod-1551483905422@> for (unknown):104
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns3.nameserver.net.au
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns2.nameserver.net.au
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns1.nameserver.net.au
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns-1728.awsdns-24.co.uk
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns-48.awsdns-06.com
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns-777.awsdns-33.net
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns-1516.awsdns-61.org
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns-10.awsdns-01.com
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns-820.awsdns-38.net
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns-1514.awsdns-61.org
Sat Mar  2 09:56:19 2019 [24240] info: dns: new_dns_packet: domain is utf8 flagged: ns-1734.awsdns-24.co.uk
Sat Mar  2 09:56:30 2019 [50687] info: util: setuid: ruid=104 euid=104 rgid=112 112 112 egid=112 112 112 
Sat Mar  2 09:56:31 2019 [24240] info: spamd: identified spam (-95.8/-500.0) for (unknown):104 in 14.0 seconds, 26679 bytes.
Sat Mar  2 09:56:31 2019 [24240] info: spamd: result: Y -95 - ADD_TO_SCORE,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,INVALID_MSGID,KAM_REALLYHUGEIMGSRC,RCVD_IN_DNSWL_NONE,SPF_PASS,USER_IN_ALL_SPAM_TO scantime=14.0,size=26679,user=(unknown),uid=104,required_score=-500.0,rhost=10.10.10.150,raddr=10.10.10.150,rport=64885,mid=<1551385408751-sg-apac-prod-1551483905422@>,autolearn=disabled
You can see that the score for this message is -95.8 from -500 (both negative numbers)
and the RESULT sent back to hMailserver is -95

This is ALWAYS the case for me.

This is clearly SpamAssassin sending a rounded response to hMailserver, my hmailserver is at 10.10.10.150
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
mattg
Moderator
Moderator
Posts: 19646
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Decimal values for spam tests

Post by mattg » 2019-03-02 02:43

mikernet wrote:
2019-03-02 02:36
You wouldn't happen to know if there's a way to configure SA to multiply the final score by a certain amount without editing every single rule would you? If I could multiply the score before it's returned then I could get more granular control over the threshold values in hMailServer as I'll have a wider range of values to play with. My searches aren't turning up anything useful at the moment.
I have a rule in SpamAssassin that adds 2.2 to all mail t make it match my hMailserver settings


Called 'ADD_TO_SCORE' in my last post
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply