Bug 5990 - MIME QP LONG LINE uses decoded line length
Summary: MIME QP LONG LINE uses decoded line length
Status: RESOLVED INVALID
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Plugins (show other bugs)
Version: 3.2.3
Hardware: PC Linux
: P5 normal
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-26 06:04 UTC by Peter J. Holzer
Modified: 2008-09-26 08:13 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Peter J. Holzer 2008-09-26 06:04:13 UTC
This is related to bug #5491 but it is a different issue.

The description of MIME_QP_LONG_LINE reads:

The Quoted-Printable encoding REQUIRES that encoded lines be no more than 76 characters long. See page 18: [WWW] http://www.ietf.org/rfc/rfc1521.txt

However, the code in Mail/SpamAssassin/Plugin/MIMEEval.pm counts the 
decoded line length, as can be shown by adding some debugging code at
line 296:

      if ($where != 1 && $cte eq "quoted-printable" && ! /^SPAM: /) {
        if (length > 77) {
          open(my $debug_fh, '>>', '/var/tmp/spamassassin.' . time() . ".$$");
          print $debug_fh "long line: (", length, "): <$_>\n";
          $pms->{mime_qp_long_line} = 1;
        }

prints 

long line: (111): <Please open the attached document. This document was digitally sent to you using an HP Digital Sending device.
>
long line: (175): <To view this document you need to use the Adobe Acrobat Reader. For more information on the HP MFP Digital Sending Software or a free copy of the Acrobat reader please visit:
>

for the following message:

----------------------------------------------------------------------------
[...]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


Please open the attached document. This document was digitally sent to you =
using an HP Digital Sending device.


To view this document you need to use the Adobe Acrobat Reader. For more in=
formation on the HP MFP Digital Sending Software or a free copy of the Acro=
bat reader please visit:
[...]
----------------------------------------------------------------------------

The encoded lines are exactly 76 characters (excluding CRLF) long, but
MIME_QP_LONG_LINE is set anyway because it looks at the decoded length.
Comment 1 Peter J. Holzer 2008-09-26 06:31:55 UTC
This seems to be fixed in 3.2.5
Comment 2 Peter J. Holzer 2008-09-26 08:13:47 UTC
Sorry, sloppy testing on my part.

The mail in question did indeed have long lines when it reached the MX (running spamassassin 3.2.3). It was fixed by my MDA, so I (and spamassassin 3.2.5) didn't see anything wrong with the mail in my mailbox. But wireshark revealed the truth :-).

So there's nothing wrong with SA.