On 2/1/2017 6:17 AM, Pedro David Marco wrote:
Hi!

i have noticed that when an email contains this (wrong) headers:

Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: base64

as SMTP headers, not MIME headers, and the email body is not base64 enconded, email clients as Thunderbird show the content correctly but
SpamAssasin body rules are blind.

Example:

suppose a rule like
bodyTEST_TEXT_DETECTED/TEST TEXT/
scoreTEST_TEXT_DETECTED1
describeTEST_TEXT_DETECTEDTest text detected

With this  .eml:  (minimized)

# cat test.eml
From: LinkedIn Email Confirmation <emailconf...@linkedin.naver.com>
To: "jcornago@" <sia.es jcorn...@sia.es>
Date: Tue, 8 Mar 2016 04:18:08 +0000
Subject: Please confirm your email address
TEST TEXT
#

The rule triggers ok!  Now i add headers:

# cat test.eml
From: LinkedIn Email Confirmation <emailconf...@linkedin.naver.com>
To: "jcornago@" <sia.es jcorn...@sia.es>
Subject: Please confirm your email address
Date: Tue, 8 Mar 2016 04:18:08 +0000
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: base64
TEST TEXT
#

And the rule never triggers!
I agree.  The test does not trigger

The second test will trigger utf8_mode on

Feb 1 21:29:32.246 [26958] dbg: message: HTML::Parser utf8_mode on (assumed UTF-8 octets)
Content-Type: text/html; charset="utf-8"
It makes sense since SA tries to decode the body before applying rules but Thunderbird shows the email correctly in
both cases (the email is human readable).
Can anyone please try it as well to discard it is only me... just add those 2 headers at the end of smtp headers section..


I would say Thunderbird is not parsing it correctly. Looking to see if this is a spam indicator.

Reply via email to