SA Bugzilla – Bug 5990
MIME QP LONG LINE uses decoded line length
Last modified: 2008-09-26 08:13:47 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.
This seems to be fixed in 3.2.5
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.