Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spam Score shows wrong tool tip text "Not Spam: 7.3/5" #162

Closed
realsimix opened this issue Nov 18, 2021 · 7 comments
Closed

Spam Score shows wrong tool tip text "Not Spam: 7.3/5" #162

realsimix opened this issue Nov 18, 2021 · 7 comments

Comments

@realsimix
Copy link

Describe the bug
Looking at a Spam message, when moving the mouse to the red bar, the tool tip always shows "Not Spam" even in case it is Spam.

To Reproduce
Steps to reproduce the behavior:
The screenshot shows what the issue is, it says "Not Spam: 7.3/5" which clearly means it is Spam:

Expected behavior
The tool tip should show something like "Spam: 7.3/5"

Screenshots
Screenshot_2021-11-18_09-14-08

Desktop (please complete the following information):

  • Browser [firefox 91.3.0esr]
  • SnappyMail Version [2.9.2]

Additional info
The header was generated by SpamAssassin:

X-Spam-Flag: YES
X-Spam-Level: *******
X-Spam-Status: Yes, score=7.3 required=5.0 tests=BAYES_00,DKIM_ADSP_NXDOMAIN,
	HTML_IMAGE_ONLY_16,HTML_MESSAGE,HTML_MIME_NO_HTML_TAG,...

Thanks,
Simon

@realsimix
Copy link
Author

Sorry, that doesn't really fix it because now it shows non Spam mails also as "Spam".

the-djmaze pushed a commit that referenced this issue Nov 18, 2021
@the-djmaze
Copy link
Owner

Does this second change solve it?

the-djmaze pushed a commit that referenced this issue Nov 18, 2021
@the-djmaze
Copy link
Owner

the-djmaze commented Nov 18, 2021

Reverted my last change due to SpamAssassin examples i found:

X-Spam-Status: No, score=2.0
X-Spam-Score: 20
X-Spam-Bar: ++
X-Spam-Status: No, score=-3.1
X-Spam-Score: -30
X-Spam-Bar: ---
X-Spam-Status: Yes, score=8.6
X-Spam-Score: 86
X-Spam-Bar: ++++++++
X-Spam-Report: Spam detection software, running on the system "example.com",
 has identified this incoming email as possible spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 root\@localhost for details.
 Content preview:  In nur 15 Minuten Gewissheit bei Sehr geehrte Damen und Herren,
    wir haben noch versandbereit: Der einfach Corona Speicheltest. Einfache schmerzfreie
    Probenentnahme. Ideal für zu Hause, Pflegereinrichtungen und Unternehmen,
    Ärzte, Testzentren, Firmen usw. 
 Content analysis details:   (8.6 points, 4.0 required)
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
                             mail domains are different
  1.1 DATE_IN_PAST_03_06     Date: is 3 to 6 hours before Received: date
  0.1 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts
  1.7 RAZOR2_CHECK           Listed in Razor2 (http://razor.sf.net/)
  2.4 RAZOR2_CF_RANGE_51_100 Razor2 gives confidence level above 50%
                             [cf: 100]
  3.0 XM_RECPTID             Has spammy message header
X-Spam-Flag: YES

the-djmaze pushed a commit that referenced this issue Nov 18, 2021
@realsimix
Copy link
Author

Well, Spamassassin can be configured to add all kind of headers but maybe it's good to make sure things work with the default configuration of Spamassasin. From the SA docs:

Here are some examples (these are the defaults, note that Checker-Version can not be changed or removed):

  add_header spam Flag _YESNOCAPS_
  add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_
  add_header all Level _STARS(*)_
  add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_

So as you can see the example I've shown is what Spasassasin uses by default:

X-Spam-Flag: YES
X-Spam-Level: *******
X-Spam-Status: Yes, score=7.3 required=5.0 tests=BAYES_00,DKIM_ADSP_NXDOMAIN,
	HTML_IMAGE_ONLY_16,HTML_MESSAGE,HTML_MIME_NO_HTML_TAG,...

The examples you have shown above are NOT from a default Spamassassin installation.

Regards,
Simon

@the-djmaze
Copy link
Owner

the-djmaze commented Nov 19, 2021

You are right, but the check should be 'X-Spam-Status: Yes' to mark it as potential spam.
So the last change should do that

@realsimix
Copy link
Author

I can confirm it works nicely now.

Thanks!

@the-djmaze
Copy link
Owner

You're welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants