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...@bugzilla.spamassassin.org on 2007/10/18 11:46:53 UTC

[Bug 5690] New: BAD_ENC_HEADER matches only spaces

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5690

           Summary: BAD_ENC_HEADER matches only spaces
           Product: Spamassassin
           Version: 3.2.3
          Platform: Other
               URL: http://www.rfc.se/rfc/rfc2047.txt
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Rules
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: emil@pyttemjuk.se


Hi,

While evaluating some strange rule scoring I noticed that BAD_ENC_HEADER
actually only search for spaces in the middle of strings.

The rule /=\?[^?\s]+\?[^?\s]\?\s*[^?]+\s(?!\?=)/ correktly matches the following:
=?iso-8859-1?Q?foobar gazonk?=

It does not however match:
=?iso-8859-1?Q?  foobar?=
=?iso-8859-1?Q?foobar ?=
=?iso-8859-1?Q?r�ksm�rg�s?=
=?iso-8859-1?R?foobar=20gazonk?=

Reference is rfc2047 part "2. Syntax of encoded-words".

I suggest that the rule is rewritten somewhat to detect more errors in coding.



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

[Bug 5690] BAD_ENC_HEADER matches only spaces

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5690





------- Additional Comments From svs@ropnet.ru  2007-12-24 02:46 -------
Valid mail from Microsoft mailers (Exchange etc.) sometimes is flagged by this
rule.  Case in point -- long Cc: header where base64-encoded real name is split
into two lines.  Relevant RFCs do not agree:

RFC 2045 (defines base64 encoding):

<...> All line breaks or other characters not found in Table 1 must be ignored
by decoding software.

In base64 data, characters other than those in Table 1, line breaks, and other
white space probably indicate a transmission error, about which a
warning message or even a message rejection might be appropriate
under some circumstances. <...>

RFC 2047 (MIME):

<...> Only a subset of the printable ASCII characters may be used in
'encoded-text'.  Space and tab characters are not allowed, so that
the beginning and end of an 'encoded-word' are obvious.

Each 'encoded-word' MUST encode an integral number of octets.  The
'encoded-text' in each 'encoded-word' must be well-formed according
to the encoding specified; the 'encoded-text' may not be continued in
the next 'encoded-word'. <...>



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