Giter Site home page Giter Site logo

Comments (12)

friedPotat0 avatar friedPotat0 commented on August 18, 2024

Thanks for your feedback!

It should be no problem to add further support for this mail headers. Are there any detailed rules listed in this mail headers that can be parsed or only the overall score?

It would be nice if you could provide a full header example for each of your cases.

At the moment it is not planed to add an add-on setting to adjust the score parsing for custom mail headers directly by the user. So if there are any additional cases to consider, please feel free to post them here.

from spam-scores.

nyarlatothep avatar nyarlatothep commented on August 18, 2024

Hi.

Mostly i am using MailScanner as the spamfilter, which produces something like this

X-MyCompany-MailScanner-From: [email protected]
X-MyCompany-MailScanner-SpamScore: ssssssss
X-MyCompany-MailScanner-SpamCheck: spam, SpamAssassin (not cached, score=8.609,
	required 3, BAYES_50 0.80, FREEMAIL_FORGED_FROMDOMAIN 0.25,
	FREEMAIL_FROM 0.00, FROM_NOT_REPLYTO 2.00, GB_FREEMAIL_DISPTO 0.00,
	HEADER_FROM_DIFFERENT_DOMAINS 0.25, HTML_FONT_LOW_CONTRAST 0.00,
	HTML_MESSAGE 0.00, KAS_SPAM_BRBL 1.00, RDNS_NONE 0.79,
	SCHAALIT_HEADER_4074 1.50, SPF_HELO_NONE 0.00, SPF_NONE 0.00,
	SPOOFED_FREEMAIL 2.00, SPOOFED_FREEMAIL_NO_RDNS 0.02)

The name of the header differs from different MailScanner-Installations, so i can't mention all of them (for examply "X-SecondCompany-MailScanner-SpamCheck", etc....). All of them should have the keyword "MailScanner" in their name.

It can happen, that there are both my MailScanner-Headers and "X-Spam-Status" from somewhere else in the same mail, don't know how to tell your plugin which one is the preferred to show.

Hope this helps.

Thanks again,
nyar

from spam-scores.

friedPotat0 avatar friedPotat0 commented on August 18, 2024

Ok. So there are more things to do than simply adding support for MailScanner headers. Is it correct that after "X-MyCompany-MailScanner-SpamScore:" the total score (8.609) is written?

I've already implemented the MailScanner headers with variable company/domain names (X-*-MailScanner-SpamCheck/SpamScore). It is tested based on the example you've given.

At the moment different spam headers in a single mail are parsed in the following order (first match is displayed, others are ignored):

  1. x-spamd-result
  2. x-spam-score
  3. x-spam-status
  4. x-*-mailscanner-spamscore

If you like to test the new version, you can download the files from the mailscanner-headers branch (https://github.com/friedPotat0/Spam-Scores/archive/mailscanner-headers.zip) and create a new ZIP file containing all files in the "Spam-Scores-mailscanner-headers" folder. Then you can add the file to thunderbird by drag & drop to install the new version.
When installed, click on any of the mails containing an unrecognised MailScanner header and then restart Thunderbird. After the restart the folder containing messages with this headers have to be repaired in order to show the score in the score column.

from spam-scores.

nyarlatothep avatar nyarlatothep commented on August 18, 2024

Wow, fast work!

I installed you new version, but it does work not as expected.

It shows no numeric score in the mail list view and it shows "Spam Score: sssssss" in the action bar (and all triggered rules).
So it seems to use the "x-*-mailscanner-spamscore" header, which displays the score not as a number but with the letter "s" for each score-point. (The letter "s" is configurable by the MailScanner-user, so you can't depend on it). This is for better usage within sieve-filtering.

It is correct, that in the header "X-MyCompany-MailScanner-SpamCheck:" the total score is written as a number. You should parse in this header for the keyword score=8.609.

So perhaps you should change your code from "....SpamScore" to ".....SpamCheck".

Thanks for your time
nyar

from spam-scores.

friedPotat0 avatar friedPotat0 commented on August 18, 2024

Thanks for clarifiying. I was not aware of the fact that such a configurable spamscore header exists. I've changed the header to spamcheck. Please check out the new version (https://github.com/friedPotat0/Spam-Scores/archive/mailscanner-headers.zip).

from spam-scores.

nyarlatothep avatar nyarlatothep commented on August 18, 2024

Almost there.... :)

The mail list view now shows "NaN" instead of the number, but in the action bar the number is correctly displayed.
Maybe that's because the number from the Mailscanner-score is with three digits (8.609) behind the point instead the Spamassassin-score with only one digit (would be 8.6)....?

Still my problem exists with the order of parsing, because if a Spamassassin header is present it is shown instead my own Mailscanner-header, as you mentioned in your posting above. But i guess that's a little more complicated to change, so i am happy with all your support right now.

Really great work.
nyar

from spam-scores.

friedPotat0 avatar friedPotat0 commented on August 18, 2024

Have you tried restarting Thunderbird and repairing the folder containing the mails with this spam header? That is only necessary for the spam column in the mail list view.

from spam-scores.

friedPotat0 avatar friedPotat0 commented on August 18, 2024

I've opened a new issue for the header priority option. #7

from spam-scores.

nyarlatothep avatar nyarlatothep commented on August 18, 2024

Have you tried restarting Thunderbird and repairing the folder containing the mails with this spam header? That is only necessary for the spam column in the mail list view.

Both done, not getting better, still showing "NaN" in spam column, but correct Spam-Score in message action bar.

from spam-scores.

friedPotat0 avatar friedPotat0 commented on August 18, 2024

Hopefully it should be fixed now... πŸ™‚

from spam-scores.

nyarlatothep avatar nyarlatothep commented on August 18, 2024

Hopefully it should be fixed now... πŸ™‚

Correct. Thanks for the fast and great work!

from spam-scores.

friedPotat0 avatar friedPotat0 commented on August 18, 2024

The change is now publicly available in the new version 1.1.3

from spam-scores.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.