You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2020/08/21 19:22:26 UTC

[Bug 7851] New: charset=ascii is not recognized, leading to MIME_CHARSET_FARAWAY hit

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7851

            Bug ID: 7851
           Summary: charset=ascii is not recognized, leading to
                    MIME_CHARSET_FARAWAY hit
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Plugins
          Assignee: dev@spamassassin.apache.org
          Reporter: billcole@apache.org
  Target Milestone: Undefined

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7851] charset=ascii is not recognized, leading to MIME_CHARSET_FARAWAY hit

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7851

--- Comment #3 from Bill Cole <bi...@apache.org> ---
Created attachment 5720
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5720&action=edit
Redacted example of problematic mail via MailGun from Patreon

(Replacing broken attachment)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7851] charset=ascii is not recognized, leading to MIME_CHARSET_FARAWAY hit

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7851

Bill Cole <bi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #5 from Bill Cole <bi...@apache.org> ---
(In reply to RW from comment #1)
> meta MIME_CHARSET_FARAWAY	(__MIME_CHARSET_FARAWAY && __HIGHBITS)
> body __HIGHBITS                     /(?:[\x80-\xff].?){4}/
> 
> __HIGHBITS seems redundant as __MIME_CHARSET_FARAWAY includes a check that
> the rendered body octets are mostly high-bit.

Can you point me at that code? I don't see it and the attached example that hit
the bug certainly isn't mostly or even significantly high-bit, with the only
non-ascii I can find being a single 4-byte character in the properly-encoded
utf-8 Subject header (which SA prepends to the body for scanning.) 

> 'ascii' is not an official alias for US-ASCII and if it really is in ASCII
> than it shouldn't be mostly high-bit.

See https://www.iana.org/assignments/character-sets/character-sets.xhtml

The intro text on that page says that 'ASCII' is or was used as an alternative
name for US-ASCII. A careless reading could result in one believing it to be
acceptable as a MIME charset. At least one antique MUA (MailForge for MacOS X)
and one significant current ESP (MailGun) have created mail with
"charset=ascii"  in the Content-Type header.

> I think the real problem may be that there is no check that there are
> high-bits outside of the decoded Subject line.

That would address this specific case. It would not address the underlying fact
of mail composers using charset=ascii where they should use charset=us-ascii. 


This has been fixed in r1881066.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7851] charset=ascii is not recognized, leading to MIME_CHARSET_FARAWAY hit

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7851

Bill Cole <bi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |billcole@apache.org

--- Comment #2 from Bill Cole <bi...@apache.org> ---
Created attachment 5719
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5719&action=edit
Redacted example of problematic mail via MailGun from Patreon

See attachment: an example of a message from Patreon via Mailgun (a largely-ham
ESP.)
Also seen in mail from the antique MacOS X MUA MailForge.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7851] charset=ascii is not recognized, leading to MIME_CHARSET_FARAWAY hit

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7851

Bill Cole <bi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #5719|0                           |1
        is obsolete|                            |
   Attachment #5720|0                           |1
        is obsolete|                            |

--- Comment #4 from Bill Cole <bi...@apache.org> ---
Created attachment 5721
  --> https://bz.apache.org/SpamAssassin/attachment.cgi?id=5721&action=edit
Redacted example of problematic mail via MailGun from Patreon

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7851] charset=ascii is not recognized, leading to MIME_CHARSET_FARAWAY hit

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7851

RW <rw...@googlemail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rwmaillists@googlemail.com

--- Comment #1 from RW <rw...@googlemail.com> ---
meta MIME_CHARSET_FARAWAY       (__MIME_CHARSET_FARAWAY && __HIGHBITS)
body __HIGHBITS                     /(?:[\x80-\xff].?){4}/

__HIGHBITS seems redundant as __MIME_CHARSET_FARAWAY includes a check that the
rendered body octets are mostly high-bit.

'ascii' is not an official alias for US-ASCII and if it really is in ASCII than
it shouldn't be mostly high-bit.

I think the real problem may be that there is no check that there are high-bits
outside of the decoded Subject line.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7851] charset=ascii is not recognized, leading to MIME_CHARSET_FARAWAY hit

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7851

--- Comment #6 from RW <rw...@googlemail.com> ---
(In reply to Bill Cole from comment #5)


> Can you point me at that code? I don't see it 

You're right I was looking for eval:check_for_faraway_charset rather than
eval:check_for_mime('mime_faraway_charset')

-- 
You are receiving this mail because:
You are the assignee for the bug.