friedPotat0 / Spam-Scores

Thunderbird add-on to display spam scores according to mail headers. Supports spam/ham score headers of Rspamd and SpamAssassin. The add-on adds a column with the overall spam score to the mail list view and shows details of any matched spam/ham rule.
https://addons.thunderbird.net/de/thunderbird/addon/spam-scores/
Other
42 stars 6 forks source link

Is it possible to add support for fastmail #45

Open pitdicker opened 2 years ago

pitdicker commented 2 years ago

Fastmail adds headers of the following format:

X-Spam-known-sender: no
X-Spam-sender-reputation: 500 (none)
X-Spam-score: 0.0
X-Spam-hits: DCC_REPUT_00_12 -0.8, HTML_IMAGE_ONLY_28 0.726, HTML_MESSAGE 0.001,
  ME_SENDERREP_NEUTRAL 0.001, MIME_HTML_ONLY 0.1, RCVD_IN_MSPIKE_H2 -0.001,
  SPF_HELO_NONE 0.001, SPF_PASS -0.001, T_SCC_BODY_TEXT_LINE -0.01,
  UNPARSEABLE_RELAY 0.001, LANGUAGES nl, BAYES_USED none, SA_VERSION 3.4.2
X-Spam-source: IP='#.#.#.#', Host='{url}',
  Country='US', FromHeader='nl', MailFrom='nl'

To be honest I haven't really used your extension yet, as the only thing I see is the spam score, not a breakdown of the causes. Is it possible to add support for Fastmail?

A related suggestion: maybe it is good to set an expectation for a handful of popular mail providers like Gmail in your readme and on addons.mozilla.org. If the provider doesn't add the relevant headers there is of course nothing the extension can do, but it seems like it doesn't function.

friedPotat0 commented 2 years ago

Thank you for the suggestion. It should not be very difficult to support these headers. Nevertheless, I noticed some unusual things in the example headers. Firstly, I wonder if you have manually changed the X-Spam-score in this example? When I sum up the scores of the individual rules I get a total score of 0.018 and not 0. Maybe Fastmail rounds at this point? However, this would not be relevant for displaying the scores. I'm just curious.

Other than that, there seem to be some spam causes that just contain additional information and don't have any score at all: LANGUAGES, BAYES_USED, SA_VERSION. I am currently not quite sure how and whether the add-on should display this information. For instance, the values could be displayed in the details popup in the description column, or this information could be left out of the popup completely. Are there any preferences about this on your side?

For reference, here is a screenshot of the details popup when the header would be parsed with no specific adjustments:

image

Regarding the readme suggestion: Actually none of the big commercial providers I know add any SpamAssassin or rspamd headers to their mails. But there are still hybrid providers who act as commercial mail providers but use open source software for their spam filters like Fastmail. I am not really sure which mail providers use which spam filters. However, I understand the problem and would appreciate a list of supported providers. I will try to create such a list with the providers I know at the moment.