2
ISpamAssassin - will not be added to the TotalSpamWeight
Question asked by Dave Camenisch - 4/15/2020 at 11:38 PM
Answered
For an effective fight against spam, it is important to know exactly how rules work. But this is exactly where I have a big problem of understanding the entry "ISpamAssassin". 

Here is a simple example:

X-SmarterMail-Spam: ISpamAssassin [raw:2]: 0, SPF [Pass]: 0, DKIM [Pass]: 0, Custom Rules [Roh Corona: 9]
X-SmarterMail-SpamDetail: 0.0 HTML_MESSAGE HTML included in message
X-SmarterMail-SpamDetail: 2.0 HTML_IMAGE_ONLY_16 HTML: images with 1200-1600 bytes of words
X-SmarterMail-TotalSpamWeight: 9

Shouldn't SpamAssassin increase the total value here by 2 points? Then why is there always 0 after the [raw:X] value? Have I deactivated SpamAssassin somewhere in the settings, so that it only shows the value, but does not add it?

-- Dave

PS: SM17 Build 7242 running

6 Replies

Reply to Thread
0
echoDreamz Replied
2 is the score from SpamAssassin. Which isn’t high enough for SmarterMail to give a weight to. So it scores a 0. 
0
Dave Camenisch Replied
I have chosen the example above for simplicity. What do I have to configure in this case so that SpamAssassin has an influence on the scoring?

Here is another example with a SA score of [raw:9], but still 0 in the overall rating:

X-SmarterMail-Spam: ISpamAssassin [raw:9]: 0, SPF [Pass]: 0, DKIM [Pass]: 0, Custom Rules [Roh Casino: 4;Roh Corona: 6]
X-SmarterMail-SpamDetail: 3.6 NA_DOLLARS Talks about a million North American dollars
X-SmarterMail-SpamDetail: 0.0 HTML_MESSAGE HTML included in message
X-SmarterMail-SpamDetail: 0.9 MISSING_HEADERS Missing To: header
X-SmarterMail-SpamDetail: 2.4 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date
X-SmarterMail-SpamDetail: 2.3 ADVANCE_FEE_2 Appears to be advance fee fraud (Nigerian 419)
X-SmarterMail-SpamDetail: 0.0 T_LOTS_OF_MONEY Huge... sums of money
X-SmarterMail-TotalSpamWeight: 10
0
Robert Emmett Replied
Employee Post
EchoDreamz is correct in that the raw score of 2 is what Internal SpamAssassin returned.  SmarterMail will then use the following formula to generate the SM score:

rawScore / internal_spamassassin_threshold * internal_spamassassin_weight_low

The default low weight is 10.  The threshold is 6.3.  This threshold can be modified in the System settings.json file.  We truncate off the decimal portion of the resulting weighted score.

Using the default values with a raw score of 2 would return: 2 / 6.3 * 10 = 3.  What is your low weight for the internal spam assassin?
Robert Emmett
Software Developer
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
0
Dave Camenisch Replied
@Robert Emmett  I guess I found a bug. This is what the values in my settings.json look like:

"internal_spamassassin_data_files_path": "SAData",
"internal_spamassassin_enabled": true,
"internal_spamassassin_enabled_out": false,
"internal_spamassassin_header_log_option": 2,
"internal_spamassassin_threshold": 63.0,
"internal_spamassassin_weight_high": 8,
"internal_spamassassin_weight_low": 2,
"internal_spamassassin_weight_medium": 5,
According to your statement above, the threshold should be 6.3. Well, it's 63.0 for me. So I manually adjusted it to 6.3 in the json file. However, I found the following problem afterwards: As soon as I change anything in the "SpamAssassin-Based Pattern Matching" settings in the admin area, the threshold is reset to 63.0! So it is now clear why I always get a 0-rating at the end based on your formula.

Do I really have discovered two bugs here? (1. that the threshold is 63.0 instead of 6.3 and 2. that it is always reset to a default value whenever you change anything in the settings).
(Build 7242)

0
Robert Emmett Replied
Employee Post Marked As Answer
Before manually adjusting the value, did you stop the mailservice?  That value is stored in memory and written out to the file whenever settings within the interface are changed.
Robert Emmett
Software Developer
SmarterTools Inc.
(877) 357-6278
www.smartertools.com
1
Dave Camenisch Replied
Thank you Robert! That's where I made the mistake. I didn't know that you had to stop the service to do that.

Now I also get a score from ISpamAssassin. Happy again :-)

Reply to Thread